forked from Shaunwei/RealChar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
76 lines (71 loc) · 1.99 KB
/
docker-compose.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.8'
services:
db:
build:
context: .
dockerfile: Dockerfile.postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data/realchar
ports:
- '5432:5432'
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
env_file:
- ./.env
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/status"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: ./client/next-web/
dockerfile: Dockerfile.dev
args:
NEXT_PUBLIC_FIREBASE_API_KEY: AIzaSyAVqhwbdB8I56HAMVVlgJKZcfrBkKI2AhQ
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: assistly-kubernetes.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID: assistly-kubernetes
NEXT_PUBLIC_FIREBASE_APP_ID: 1:806733379891:web:48bf124c0d9b90298e6646
REACT_APP_BUILD_NUMBER: 0.0.1
NEXT_PUBLIC_API_HOST: http://localhost:8000
API_HOST: http://backend:8000
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
db:
condition: service_healthy
environment:
- NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyAVqhwbdB8I56HAMVVlgJKZcfrBkKI2AhQ
- NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=assistly-kubernetes.firebaseapp.com
- NEXT_PUBLIC_FIREBASE_PROJECT_ID=assistly-kubernetes
- NEXT_PUBLIC_FIREBASE_APP_ID=1:806733379891:web:48bf124c0d9b90298e6646
- REACT_APP_BUILD_NUMBER=0.0.1
- NEXT_PUBLIC_API_HOST=http://localhost:8000
- API_HOST=http://backend:8000
networks:
default:
driver: bridge
volumes:
db:
driver: local