-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
89 lines (83 loc) · 1.97 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
77
78
79
80
81
82
83
84
85
86
87
88
89
version: "3.8"
services:
redis:
image: redis:6.2-alpine
restart: always
ports:
- "6380:6379"
volumes:
- ./data:/data
database:
restart: unless-stopped
image: postgres:15
ports:
- 5444:5432
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_PORT: "5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 5
api:
restart: unless-stopped
expose:
- 3000
build:
context: ./api
environment:
DATABASE_URL: "postgres://postgres:postgres@database:5432/postgres?sslmode=disable&connect_timeout=30"
API_ORIGIN: http://localhost:3000
AUTH_SIGNUP_ENABLED: "1"
JWT_SECRET: replace_in_production_with_actual_secret
JWT_EXPIRATION_PERIOD_SECONDS: 3600
API_GQL_ENDPOINT: "http://localhost:3000"
REDIS_TLS_URL: "redis://redis:6379"
PORT: 3000
depends_on:
database:
condition: service_healthy
redis:
condition: service_started
frontend:
restart: unless-stopped
build:
context: ./frontend
args:
NEXT_PUBLIC_SWITCHBOARD_GRAPHQL_HOST: "http://localhost:3000"
environment:
NEXT_PUBLIC_SWITCHBOARD_GRAPHQL_HOST: "http://localhost:3000"
expose:
- 3000
depends_on:
- api
wundergraph:
platform: linux/amd64
restart: unless-stopped
expose:
- 3000
build:
context: ./wundergraph
environment:
SWITCHBOARD_GQL_ENDPOINT: "http://api:3000/drives"
depends_on:
api:
condition: service_healthy
reverse-proxy:
restart: unless-stopped
build:
context: ./nginx
ports:
- "3000:3000"
environment:
PORT: 3000
FRONTEND: "http://frontend:3000"
BACKEND: "http://api:3000"
WUNDERGRAPH: "http://wundergraph:3000"
depends_on:
- api
- frontend
- wundergraph