-
Notifications
You must be signed in to change notification settings - Fork 59
/
docker-compose.stage.yaml
56 lines (55 loc) · 1.89 KB
/
docker-compose.stage.yaml
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
version: '3'
services:
reverse-proxy:
image: traefik:v2.2
restart: unless-stopped
env_file: envs/stage.env
command:
- "--api.insecure=false"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.address=:80"
- "--entrypoints.metrics.address=:8081"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--certificatesresolvers.server.acme.tlschallenge=true"
- "--certificatesresolvers.server.acme.email=${SERVICE_EMAIL}"
- "--certificatesresolvers.server.acme.storage=/letsencrypt/acme.json"
ports:
- 80:80
- 443:443
- 8081:8081
volumes:
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
server:
image: docker.pkg.github.com/haroldtreen/epub-press/server:stage
depends_on:
- postgres
env_file: envs/stage.env
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.epub-press.rule=Host(`${SERVICE_HOST}`)
- traefik.http.routers.epub-press.entrypoints=web,websecure
- traefik.http.routers.epub-press.tls.certresolver=server
- traefik.http.routers.epub-press.tls=true
prometheus:
image: prom/prometheus
restart: unless-stopped
env_file: envs/stage.env
depends_on:
- server
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
labels:
- traefik.enable=true
- traefik.http.routers.metrics.entrypoints=metrics
- traefik.http.routers.metrics.middlewares=auth
- traefik.http.routers.metrics.rule=Host(`${SERVICE_HOST}`)
- traefik.http.middlewares.auth.basicauth.users=${BASIC_AUTH_USERS}
postgres:
image: library/postgres:12
env_file: envs/stage.env
restart: unless-stopped