56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
services:
|
|
backend:
|
|
container_name: 004erpbackend
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
user: "1000:1000"
|
|
volumes:
|
|
- ./backend:/app
|
|
- media_volume:/app/media
|
|
ports:
|
|
- "8001:8000"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
db: { condition: service_healthy }
|
|
redis: { condition: service_started }
|
|
|
|
frontend:
|
|
container_name: 004erpfrontend
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
command: npm run dev -- --host 0.0.0.0 --force
|
|
ports:
|
|
- "4321:4321"
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
environment:
|
|
- NODE_ENV=development
|
|
- PUBLIC_ALLOWED_HOSTS=localhost,127.0.0.1
|
|
- PUBLIC_HMR_HOST=localhost
|
|
- PUBLIC_HMR_PROTOCOL=ws
|
|
- PUBLIC_HMR_CLIENT_PORT=4321
|
|
- PUBLIC_API_URL=http://localhost:8001/api/
|
|
|
|
flower:
|
|
container_name: 004erpflower
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
command: celery -A core flower --port=5555
|
|
ports:
|
|
- "5555:5555"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- redis
|
|
- worker
|
|
|
|
volumes:
|
|
media_volume:
|
|
external: true # Ako je definiran u glavnom file-u, ovo ga povezuje
|