Files
ranking/docker-compose.yml

50 lines
1.1 KiB
YAML

services:
backend:
container_name: ranking_backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8010:8000"
env_file:
- ./backend/.env
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- API_HOST=0.0.0.0
- API_PORT=8000
- API_RELOAD=true
- CORS_ORIGINS=http://localhost:5173,http://frontend:5173
- LOG_LEVEL=INFO
volumes:
- ./backend/src:/app/src
- ./backend/scripts:/app/scripts
- /etc/localtime:/etc/localtime:ro
networks:
- shared_network
restart: unless-stopped
frontend:
container_name: ranking_frontend
build:
context: ./frontend
dockerfile: Dockerfile
depends_on:
- backend
ports:
- "5173:5173"
volumes:
- ./frontend/src:/app/src
- ./frontend/index.html:/app/index.html
- ./frontend/vite.config.js:/app/vite.config.js
- /etc/localtime:/etc/localtime:ro
links:
- backend
networks:
- shared_network
restart: unless-stopped
networks:
shared_network:
external: true