Files
fonrey/docker-compose.yml
2026-04-28 13:15:28 +08:00

80 lines
1.3 KiB
YAML

services:
web:
build: .
env_file: .env
command: uvicorn config.asgi:application --host 0.0.0.0 --port 8000
volumes:
- .:/app
ports:
- "8001:8000"
depends_on:
- db
- redis
networks:
- fonrey_net
db:
image: postgres:16-alpine
env_file: .env
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- fonrey_net
redis:
image: redis:7-alpine
env_file: .env
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- fonrey_net
celery:
build: .
env_file: .env
command: celery -A config worker -l info
volumes:
- .:/app
depends_on:
- redis
- db
networks:
- fonrey_net
celery-beat:
build: .
env_file: .env
command: celery -A config beat -l info
volumes:
- .:/app
depends_on:
- redis
- db
networks:
- fonrey_net
tailwind:
image: node:20-alpine
working_dir: /app
env_file: .env
command: sh -c "npm install && npm run watch"
volumes:
- .:/app
networks:
- fonrey_net
networks:
fonrey_net:
volumes:
postgres_data:
redis_data: