-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (71 loc) · 2.11 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
version: '3.9'
services:
instant-mock:
build:
context: .
dockerfile: Dockerfile
args:
REACT_APP_BACKEND_URL: "${BACKEND_URL:-http://localhost}"
REACT_APP_BACKEND_PORT: "${BACKEND_PORT:-3033}"
REACT_APP_FRONTEND_URL: "${FRONTEND_URL:-http://localhost}"
REACT_APP_FRONTEND_PORT: "${FRONTEND_PORT:-3033}"
REACT_APP_FRONTEND_REQUIRE_AUTH: true
container_name: instant-mock
environment:
BACKEND_REQUIRE_AUTH: true
PORT: "${BACKEND_PORT:-3033}"
NODE_ENV: "production"
HOST: "0.0.0.0"
SUPERTOKENS_CONNECTION_URI: "http://supertokens:3567"
GITHUB_CLIENT_ID: "${GITHUB_CLIENT_ID}"
GITHUB_CLIENT_SECRET: "${GITHUB_CLIENT_SECRET}"
AZURE_CLIENT_ID: "${AZURE_CLIENT_ID}"
AZURE_CLIENT_SECRET: "${AZURE_CLIENT_SECRET}"
ports:
- "${BACKEND_PORT:-3033}:${BACKEND_PORT:-3033}"
volumes:
- ./backend/data:/app/backend/data
networks:
- app_network
depends_on:
- supertokens
- db
db:
image: 'postgres:latest'
container_name: supertokens_db
environment:
POSTGRES_USER: supertokens_user
POSTGRES_PASSWORD: somePassword
POSTGRES_DB: supertokens
ports:
- 5432:5432
networks:
- app_network
restart: unless-stopped
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'supertokens_user', '-d', 'supertokens']
interval: 5s
timeout: 5s
retries: 5
supertokens:
image: registry.supertokens.io/supertokens/supertokens-postgresql:latest
container_name: supertokens
depends_on:
db:
condition: service_healthy
environment:
POSTGRESQL_CONNECTION_URI: "postgresql://supertokens_user:somePassword@db:5432/supertokens"
ports:
- "3567:3567"
networks:
- app_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