-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: '3.8'
services:
# FastAPI Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: fastapi-backend
ports:
- "8000:8000"
environment:
- DOCUMENTDB_URL=${DOCUMENTDB_URL}
- DOCUMENTDB_DB_NAME=${DOCUMENTDB_DB_NAME}
- DEBUG=${DEBUG:-true}
- RELOAD=${RELOAD:-true}
- API_V1_PREFIX=${API_V1_PREFIX:-/api/v1}
- BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS:-["http://localhost:3000","http://localhost:8000","http://localhost"]}
networks:
- app-network
volumes:
# Mount source code for development hot-reload
- ./backend/app:/app/app:delegated
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
extra_hosts:
- "host.docker.internal:host-gateway"
# React Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: react-frontend
ports:
- "80:80"
depends_on:
- backend
networks:
- app-network
networks:
app-network:
driver: bridge