-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.23 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
44
45
46
47
48
49
50
51
52
53
services:
postgres:
image: postgres:15-alpine
container_name: adventurecode_postgres
environment:
POSTGRES_USER: adventurecode_user
POSTGRES_PASSWORD: dev_password_123
POSTGRES_DB: adventurecode_dev
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U adventurecode_user -d adventurecode_dev"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: adventurecode_backend
env_file:
- .env.development
ports:
- "8000:8000"
volumes:
- ./backend:/app
depends_on:
postgres:
condition: service_healthy
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: adventurecode_frontend
environment:
- VITE_API_URL=http://localhost:8000
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules # Prevents host node_modules from overwriting container's
depends_on:
- backend
stdin_open: true
tty: true
volumes:
postgres_data: