77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
services:
|
|
api: &api-base
|
|
image: jhumanj/opnform-api:dev
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.api
|
|
args:
|
|
APP_ENV: local
|
|
volumes:
|
|
- ./api:/usr/share/nginx/html:delegated
|
|
- /usr/share/nginx/html/vendor # Exclude vendor directory from the mount
|
|
- ./api/storage:/usr/share/nginx/html/storage:delegated # Mount storage directory directly
|
|
environment:
|
|
DB_HOST: db
|
|
REDIS_HOST: redis
|
|
DB_DATABASE: ${DB_DATABASE:-forge}
|
|
DB_USERNAME: ${DB_USERNAME:-forge}
|
|
DB_PASSWORD: ${DB_PASSWORD:-forge}
|
|
DB_CONNECTION: ${DB_CONNECTION:-pgsql}
|
|
FILESYSTEM_DISK: local
|
|
LOCAL_FILESYSTEM_VISIBILITY: public
|
|
APP_ENV: local
|
|
PHP_IDE_CONFIG: "serverName=Docker"
|
|
XDEBUG_MODE: "${XDEBUG_MODE:-off}"
|
|
XDEBUG_CONFIG: "client_host=host.docker.internal"
|
|
APP_URL: "http://localhost"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
ui:
|
|
image: jhumanj/opnform-client:dev
|
|
build:
|
|
context: .
|
|
dockerfile: docker/Dockerfile.client
|
|
command: sh -c "npm install && NITRO_HOST=0.0.0.0 NITRO_PORT=3000 npm run dev"
|
|
volumes:
|
|
- ./client:/app:delegated
|
|
- /app/node_modules # Keep container's node_modules
|
|
environment:
|
|
NODE_ENV: development
|
|
NUXT_PUBLIC_APP_ENV: development
|
|
HOST: "0.0.0.0"
|
|
PORT: 3000
|
|
# HMR settings
|
|
CHOKIDAR_USEPOLLING: "true"
|
|
WATCHPACK_POLLING: "true"
|
|
VITE_HMR_HOST: "localhost"
|
|
VITE_HMR_PORT: 24678
|
|
# API settings
|
|
NUXT_PUBLIC_APP_URL_BASE: "http://localhost"
|
|
NUXT_PUBLIC_API_BASE: "http://localhost/api"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
ports:
|
|
- "3000:3000" # Main dev server
|
|
- "24678:24678" # Vite HMR port
|
|
|
|
ingress:
|
|
volumes:
|
|
- ./docker/nginx.dev.conf:/etc/nginx/templates/default.conf.template
|
|
environment:
|
|
NGINX_HOST: localhost
|
|
NGINX_PORT: 80
|
|
ports:
|
|
- "80:80"
|
|
depends_on:
|
|
- api
|
|
- ui
|
|
|
|
api-worker:
|
|
<<: *api-base
|
|
environment:
|
|
IS_API_WORKER: "true"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy |