54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: digital-me-dev
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./digital-me-backend
|
|
target: development
|
|
image: digital-me-backend:dev
|
|
working_dir: /app
|
|
command: npm run dev
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: 3701
|
|
MONGO_URI: mongodb://host.docker.internal:27017
|
|
PUBLIC_URL: http://localhost:3702
|
|
WEB_BASE_URL: http://localhost:5173
|
|
CORS_ORIGINS: http://localhost:5173,http://localhost:8080
|
|
ports:
|
|
- "3702:3701"
|
|
volumes:
|
|
- ./digital-me-backend:/app
|
|
- backend_node_modules:/app/node_modules
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--spider", "http://127.0.0.1:3701/health"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./digital-me-web
|
|
target: development
|
|
image: digital-me-web:dev
|
|
working_dir: /app
|
|
command: sh -c "npm install --prefer-offline --no-audit --no-fund && npm run dev -- --host 0.0.0.0 --port 5173"
|
|
environment:
|
|
VITE_API_BASE_URL: http://localhost:3702
|
|
CHOKIDAR_USEPOLLING: "true"
|
|
ports:
|
|
- "5173:5173"
|
|
volumes:
|
|
- ./digital-me-web:/app
|
|
- frontend_node_modules:/app/node_modules
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
backend_node_modules:
|
|
frontend_node_modules:
|