-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.with-traefik.yml
153 lines (137 loc) · 3.97 KB
/
docker-compose.with-traefik.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
version: '3.8'
services:
echtzeitkiosk-backend:
build: .
image: ghcr.io/echtzeitsysteme/echtzeitkiosk-backend:arm64
# image: ghcr.io/echtzeitsysteme/echtzeitkiosk-backend:amd64
container_name: echtzeitkiosk-backend
depends_on:
- postgresdb
links:
- postgresdb
restart: unless-stopped
environment:
NODE_ENV: ${NODE_ENV}
PORT: ${PORT}
TZ: ${TZ}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB_NAME: ${POSTGRES_DB_NAME}
PGTZ: ${PGTZ}
JWT_SECRET: ${JWT_SECRET}
JWT_ACCESS_EXPIRATION_MINUTES: ${JWT_ACCESS_EXPIRATION_MINUTES}
JWT_RESET_PASSWORD_EXPIRATION_MINUTES: ${JWT_RESET_PASSWORD_EXPIRATION_MINUTES}
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES: ${JWT_VERIFY_EMAIL_EXPIRATION_MINUTES}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USERNAME: ${SMTP_USERNAME}
SMTP_PASSWORD: ${SMTP_PASSWORD}
EMAIL_FROM_NAME: ${EMAIL_FROM_NAME}
EMAIL_FROM_ADDRESS: ${EMAIL_FROM_ADDRESS}
BACKEND_URL: ${BACKEND_URL}
FRONTEND_URL: ${FRONTEND_URL}
PROJECT_NAME: ${PROJECT_NAME}
SUPPORT_EMAIL: ${SUPPORT_EMAIL}
SUPERUSER_EMAIL: ${SUPERUSER_EMAIL}
SUPERUSER_PASSWORD: ${SUPERUSER_PASSWORD}
INVITATION_CODE: ${INVITATION_CODE}
MONTHLY_INVOICE_CRON_JOB_STRING: ${MONTHLY_INVOICE_CRON_JOB_STRING}
expose:
- ${PORT}
networks:
- proxy
- default
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=proxy'
# routers
- 'traefik.http.routers.echtzeitkiosk-backend-secure.entrypoints=websecure'
- 'traefik.http.routers.echtzeitkiosk-backend-secure.rule=Host(`api.echtzeitkiosk.mertalpulus.eu`)'
- 'traefik.http.routers.echtzeitkiosk-backend-secure.service=echtzeitkiosk-backend'
# services
- 'traefik.http.services.echtzeitkiosk-backend.loadbalancer.server.port=${PORT}'
volumes:
- ./log/:/usr/src/app/log
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
logging:
driver: 'json-file'
options:
max-size: '512m'
postgresdb:
container_name: 'postgresdb'
image: 'postgres:14.2-alpine'
command: postgres -c stats_temp_directory=/tmp
restart: unless-stopped
networks:
- proxy
- default
expose:
- 5432
# ports:
# - 5432:5432
volumes:
- ./database/postgresdb:/var/lib/postgresql/data/
env_file:
- .env
labels:
- 'traefik.enable=true'
# routers
- 'traefik.tcp.routers.postgresdb.rule=HostSNI(`*`)'
- 'traefik.tcp.routers.postgresdb.entryPoints=postgresdb'
- 'traefik.tcp.routers.postgresdb.service=postgresdb'
# services (needed for TCP)
- 'traefik.tcp.services.postgresdb.loadbalancer.server.port=5432'
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
logging:
driver: 'json-file'
options:
max-size: '512m'
adminer:
container_name: 'adminer'
depends_on:
- postgresdb
links:
- postgresdb
image: adminer
networks:
- proxy
- default
restart: unless-stopped
expose:
- '8080'
# ports:
# - 8080:8080
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
logging:
driver: 'json-file'
options:
max-size: '512m'
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=proxy'
# routers
- 'traefik.http.routers.adminer-secure.entrypoints=websecure'
- 'traefik.http.routers.adminer-secure.rule=Host(`adminer.mertalpulus.eu`)'
- 'traefik.http.routers.adminer-secure.service=adminer'
# services
- 'traefik.http.services.adminer.loadbalancer.server.port=8080'
networks:
proxy:
external: true