# Docker

## Build

1. Run Docker
```shell
cp .env.docker .env
docker compose up
```
2. Open Backend

http://localhost:{APP_PORT}

eg: http://localhost:8000

> {APP_PORT}: is varible in environment .env

## Exec
```shell
docker exec -it payment ...
```

# Module
1. Create a new module
```shell
docker exec -it payment php artisan module:make {MODULE_NAME}
```
2. Some scripts often used
```shell
docker exec -it payment php artisan module:make-model {model} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-controller {controller} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-request {request} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-middleware {middleware} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-listener {listener} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-rule {rule} {MODULE_NAME}
```
```shell
docker exec -it payment php artisan module:make-resource {resource} {MODULE_NAME}
```
2. Status
{PROJECT_DIR}/modules_statuses.json
```json
{
    "Auth": true,
    "Hostbill": true,
    "HomePage": true
}
```
> [!NOTE]
> Please take note of this
