69 lines
1.3 KiB
YAML
69 lines
1.3 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
mongodb:
|
|
image: mongo:7
|
|
restart: unless-stopped
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: admin
|
|
MONGO_INITDB_ROOT_PASSWORD: changeme
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build:
|
|
context: ../backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8003:8001"
|
|
env_file:
|
|
- ../.env
|
|
depends_on:
|
|
- mongodb
|
|
- redis
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8001 --workers 2
|
|
|
|
celery-worker:
|
|
build:
|
|
context: ../backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ../.env
|
|
depends_on:
|
|
- mongodb
|
|
- redis
|
|
command: celery -A celery_worker worker --loglevel=info --concurrency=4
|
|
|
|
celery-beat:
|
|
build:
|
|
context: ../backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ../.env
|
|
depends_on:
|
|
- mongodb
|
|
- redis
|
|
command: celery -A celery_worker beat --loglevel=info
|
|
|
|
frontend:
|
|
build:
|
|
context: ../frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
- VITE_BASE_PATH=/cost-tracker/
|
|
- VITE_APP_ENV=${APP_ENV:-dev}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5174:80"
|
|
depends_on:
|
|
- api
|
|
|
|
volumes:
|
|
mongo_data:
|