-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (92 loc) · 2.41 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
services:
client:
container_name: client
image: ghcr.io/linkinlog/throttlr-client:latest
restart: always
ports:
- "8090:8080"
environment:
ENV: ${ENV}
SELF_HOSTED: ${SELF_HOSTED}
DEBUG: ${DEBUG}
GITHUB_KEY: ${GITHUB_KEY}
GITHUB_SECRET: ${GITHUB_SECRET}
GOOGLE_KEY: ${GOOGLE_KEY}
GOOGLE_SECRET: ${GOOGLE_SECRET}
SESSION_SECRET: ${SESSION_SECRET}
CLIENT_DB: ${CLIENT_DB}
CLIENT_CALLBACK_URL: ${CLIENT_CALLBACK_URL}
SERVER_CALLBACK_URL: ${SERVER_CALLBACK_URL}
CLIENT_INTERNAL_URL: ${CLIENT_INTERNAL_URL}
SERVER_INTERNAL_URL: ${SERVER_INTERNAL_URL}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
start_interval: 5s
networks:
- throttlr
server:
container_name: server
image: ghcr.io/linkinlog/throttlr-server:latest
restart: always
ports:
- "8091:8081"
environment:
ENV: ${ENV}
SELF_HOSTED: ${SELF_HOSTED}
DEBUG: ${DEBUG}
SESSION_SECRET: ${SESSION_SECRET}
SERVER_DB: ${SERVER_DB}
CLIENT_CALLBACK_URL: ${CLIENT_CALLBACK_URL}
SERVER_CALLBACK_URL: ${SERVER_CALLBACK_URL}
CLIENT_INTERNAL_URL: ${CLIENT_INTERNAL_URL}
SERVER_INTERNAL_URL: ${SERVER_INTERNAL_URL}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
start_interval: 5s
networks:
- throttlr
db:
container_name: db
image: postgres
restart: always
shm_size: 128mb
user: postgres
ports:
- "${POSTGRES_PORT:-5432}:5432"
environment:
POSTGRES_DB: throttlr
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db-data:/var/lib/postgresql/data
- ./build:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 2s
timeout: 5s
retries: 10
networks:
- throttlr
volumes:
db-data:
networks:
throttlr:
driver: bridge