-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
131 lines (123 loc) · 2.6 KB
/
docker-compose.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: "3.8"
services:
client:
build: ./client
ports:
- 4200:4200
volumes:
- ./client:/app
- /app/node_modules
depends_on:
- app-server
app-server:
build: ./server
ports:
- 4000:4000
env_file:
- ./.env
volumes:
- ./server:/app
- /app/node_modules
networks:
- app-network
- auth-network
- cache-network
depends_on:
- app-cache
- app-db
app-cache:
image: redis
ports:
- 6379:6379
networks:
- cache-network
restart: unless-stopped
app-db:
image: postgres:16
restart: unless-stopped
volumes:
- app-db-data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_DB: ${APPDB_NAME}
POSTGRES_USER: ${APPDB_USER}
POSTGRES_PASSWORD: ${APPDB_PASSWORD}
networks:
- app-network
- pgadmin-network
app-pgadmin:
image: dpage/pgadmin4
ports:
- 6432:80
environment:
PGADMIN_LISTEN_PORT: 80
PGADMIN_DEFAULT_EMAIL: ${APPDB_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${APPDB_PASSWORD}
networks:
- pgadmin-network
depends_on:
- app-db
volumes:
- app-pgadmin-data:/var/lib/pgadmin/data
auth-db:
image: postgres:16
environment:
POSTGRES_DB: ${AUTHDB_NAME}
POSTGRES_USER: ${AUTHDB_USER}
POSTGRES_PASSWORD: ${AUTHDB_PASSWORD}
ports:
- 5679:5679
volumes:
- auth-db-data:/var/lib/postgresql/data
networks:
- auth-network
restart: unless-stopped
command: postgres -p 5679
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${AUTHDB_USER}",
"-d",
"${AUTHDB_NAME}",
"-p",
"5679",
]
interval: 10s
timeout: 5s
retries: 5
auth-server:
image: supertokens/supertokens-postgresql:7.0
depends_on:
auth-db:
condition: service_healthy
ports:
- 3567:3567
environment:
POSTGRESQL_CONNECTION_URI: ${AUTHDB_URL}
API_KEYS: ${SUPERTOKENS_API_KEY}
networks:
- auth-network
restart: unless-stopped
healthcheck:
test: >
bash -c 'exec 3<>/dev/tcp/127.0.0.1/3567 && echo -e "GET /hello HTTP/1.1\r\nhost: 127.0.0.1:3567\r\nConnection: close\r\n\r\n" >&3 && cat <&3 | grep "Hello"'
interval: 10s
timeout: 5s
retries: 5
networks:
app-network:
driver: bridge
auth-network:
driver: bridge
cache-network:
driver: bridge
pgadmin-network:
driver: bridge
volumes:
app-db-data:
app-pgadmin-data:
auth-db-data: