-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
164 lines (155 loc) · 5.53 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version: "3"
networks:
overrun-net-api:
traefik-public:
external: true
volumes:
certs:
services:
certs-downloader:
image: alpine
command: sh -c "cd /etc/ssl/traefik && wget https://traefik.me/cert.pem -O cert.pem && wget https://traefik.me/privkey.pem -O privkey.pem"
volumes:
- certs:/etc/ssl/traefik
traefik:
image: traefik:v2.3
restart: always
command:
# Docker config
- "--providers.docker=true"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-public"
# Additional config with files
- "--providers.file=true"
- "--providers.file.directory=/etc/traefik"
# Entrypoint
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
# HTTP -> HTTPS
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
# Enable Dashboard
- "--api.dashboard=true"
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/ssl/traefik
- ./assets/traefik/tls.yml:/etc/traefik/tls.yml
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.services.traefik.loadbalancer.server.port=888"
- "traefik.http.routers.traefik.rule=Host(`traefik.${DOMAIN}`)"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=traefik-auth"
- "traefik.http.middlewares.traefik-auth.basicauth.users=user:$$apr1$$mv/7eBGq$$blXoet7kdjDve702x5gLx/"
backend:
container_name: old_overrun_backend
restart: unless-stopped
user: ${MY_UID}:${MY_GID}
build:
context: ../backend
dockerfile: Dockerfile.dev
ports:
- 8081:3000
networks:
- overrun-net-api
- traefik-public
volumes:
- ../backend:/app
environment:
EMAIL_ADDRESS: ${OVERRUN_EMAIL_ADDRESS}
EMAIL_PASSWORD: ${OVERRUN_EMAIL_PASSWORD}
DATABASE_URL: postgresql://${OVERRUN_DATABASE_USERNAME}:${OVERRUN_DATABASE_PASSWORD}@old_overrun_postgresql:5432/${OVERRUN_DATABASE_NAME}
FRONTEND_URL: ${OVERRUN_FRONTEND_URL}
HELLOASSO_CLIENT_ID:
HELLOASSO_CLIENT_SECRET:
HELLOASSO_BASE_URL:
HELLOASSO_ORGANISATION_SLUG:
HELLOASSO_TOKEN:
EDB_VA_TOKEN:
EDB_VA_CLIENT_ID:
EDB_REALM:
EDB_SSO_ENDPOINT:
EDB_VA_ENDPOINT:
labels:
- "traefik.enable=true"
- "traefik.http.routers.overrun-backend.tls=true"
- "traefik.http.routers.overrun-backend.tls.certresolver=le"
- "traefik.http.routers.overrun-backend.entrypoints=websecure"
- "traefik.http.services.overrun-backend.loadbalancer.server.port=3000"
- "traefik.http.routers.overrun-backend.rule=(Host(`overrun.${DOMAIN}`) && PathPrefix(`/api`))"
postgresql:
image: postgres
container_name: old_overrun_postgresql
restart: unless-stopped
networks:
- overrun-net-api
volumes:
- ./data/overrun/postgresql:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${OVERRUN_DATABASE_USERNAME}
POSTGRES_PASSWORD: ${OVERRUN_DATABASE_PASSWORD}
POSTGRES_DB: ${OVERRUN_DATABASE_NAME}
adminer:
image: adminer
restart: unless-stopped
networks:
- overrun-net-api
- traefik-public
environment:
ADMINER_DEFAULT_SERVER: old_overrun_postgresql
labels:
- "traefik.enable=true"
- "traefik.http.routers.overrun-dev-adminer.tls=true"
- "traefik.http.routers.overrun-dev-adminer.entrypoints=websecure"
- "traefik.http.services.overrun-dev-adminer.loadbalancer.server.port=8080"
- "traefik.http.routers.overrun-dev-adminer.rule=(Host(`overrun.${DOMAIN}`) && PathPrefix(`/adminer`))"
- "traefik.http.routers.overrun-dev-adminer.middlewares=overrun-adminer-strip"
- "traefik.http.middlewares.overrun-adminer-strip.stripprefix.prefixes=/adminer"
frontend-user:
container_name: old_overrun_frontend_user
restart: unless-stopped
user: ${MY_UID}:${MY_GID}
build:
context: ../frontend-user
dockerfile: Dockerfile.dev
volumes:
- ../frontend-user:/app
ports:
- 8082:8080
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.overrun-frontend-user.tls=true"
- "traefik.http.routers.overrun-frontend-user.tls.certresolver=le"
- "traefik.http.routers.overrun-frontend-user.entrypoints=websecure"
- "traefik.http.services.overrun-frontend-user.loadbalancer.server.port=8080"
- "traefik.http.routers.overrun-frontend-user.rule=Host(`overrun.${DOMAIN}`)"
frontend-admin:
container_name: old_overrun_frontend_admin
restart: unless-stopped
user: ${MY_UID}:${MY_GID}
build:
context: ../frontend
dockerfile: Dockerfile.dev
ports:
- 8083:8080
volumes:
- ../frontend:/app
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.overrun-frontend-admin.tls=true"
- "traefik.http.routers.overrun-frontend-admin.tls.certresolver=le"
- "traefik.http.routers.overrun-frontend-admin.entrypoints=websecure"
- "traefik.http.services.overrun-frontend-admin.loadbalancer.server.port=8080"
- "traefik.http.routers.overrun-frontend-admin.rule=(Host(`overrun.${DOMAIN}`) && PathPrefix(`/admin`))"