-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (75 loc) · 1.97 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
version: '3'
services:
db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: supertokens_user
MYSQL_PASSWORD: somePassword
MYSQL_DATABASE: supertokens
ports:
- 3306:3306
networks:
- app_network
restart: unless-stopped
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 20s
retries: 10
supertokens:
image: registry.supertokens.io/supertokens/supertokens-mysql:4.2
depends_on:
- db
ports:
- 3567:3567
environment:
MYSQL_CONNECTION_URI: mysql://supertokens_user:somePassword@db:3306/supertokens
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
server:
image: chillcheese/price-tracker-app_server
hostname: server
depends_on:
- db
- supertokens
environment:
NOTIFICATION_SENDER_EMAIL: $NOTIFICATION_SENDER_EMAIL
NOTIFICATION_SENDER_PASS: $NOTIFICATION_SENDER_PASS
API_DOMAIN: $API_DOMAIN
CLIENT_ADDRESS : $CLIENT_ADDRESS
SUPERTOKENS_ADDRESS : $SUPERTOKENS_ADDRESS
SUPERTOKENS_DATABASE_URL : $SUPERTOKENS_DATABASE_URL
API_PORT : $API_PORT
build:
context: ./server
dockerfile: Dockerfile.server
ports:
- "8080:8080"
networks:
- app_network
restart: unless-stopped
client:
image: chillcheese/price-tracker-app_client
hostname: client
environment:
API_DOMAIN: $API_DOMAIN
CLIENT_ADDRESS : $CLIENT_ADDRESS
LOGIN_API_BASE : $LOGIN_API_BASE
build:
context: ./client
dockerfile: Dockerfile.client
ports:
- "3000:3000"
networks:
- app_network
restart: unless-stopped
networks:
app_network:
driver: bridge