-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
99 lines (92 loc) · 3.05 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
version: '3.7'
services:
traefik:
image: "traefik:latest"
command:
#- "--api.dashboard=true"
#- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.tlsbroker.acme.tlschallenge=true"
- "--certificatesresolvers.tlsbroker.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.tlsbroker.acme.email=contact@shibe.technology"
- "--certificatesresolvers.tlsbroker.acme.storage=/letsencrypt/acme.json"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./letsencrypt:/letsencrypt"
ports:
- "80:80"
- "443:443"
- "127.0.0.1:8080:8080"
restart: always
labels:
- "traefik.enable=true"
# HTTPS Redirect
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
frontend:
build: ./frontend
command: ["npm", "run", "build"]
volumes:
- "frontend:/usr/src/app"
nginx:
restart: always
build: ./nginx
depends_on:
- frontend
volumes:
- "data:/usr/src/app"
labels:
- "traefik.enable=true"
# routers
- "traefik.http.routers.nginx.rule=Host(`shibe.technology`)"
- "traefik.http.routers.nginx.entrypoints=websecure"
- "traefik.http.routers.nginx.tls.certresolver=tlsbroker"
- "traefik.http.routers.nginx.tls=true"
# services
- "traefik.http.services.nginx.loadbalancer.server.port=80"
backend:
build: ./backend
restart: always
labels:
- "traefik.enable=true"
# routers
- "traefik.http.routers.backend.rule=Host(`api.shibe.technology`)"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=tlsbroker"
- "traefik.http.routers.backend.tls=true"
#services
- "traefik.http.services.backend.loadbalancer.server.port=5000"
volumes:
- "data:/data"
fathom:
image: usefathom/fathom:latest
restart: always
environment:
- "FATHOM_SERVER_ADDR=:8080"
- "FATHOM_GZIP=true"
- "FATHOM_DEBUG=false"
- "FATHOM_DATABASE_DRIVER=sqlite3"
- "FATHOM_DATABASE_NAME=data/fathom.db"
- "FATHOM_DATABASE_USER=fathom"
- "FATHOM_DATABASE_PASSWORD=password"
- "FATHOM_SECRET=secret"
labels:
- "traefik.enable=true"
# routers
- "traefik.http.routers.fathom.rule=Host(`fathom.shibe.technology`)"
- "traefik.http.routers.fathom.entrypoints=websecure"
- "traefik.http.routers.fathom.tls.certresolver=tlsbroker"
- "traefik.http.routers.fathom.tls=true"
# services
- "traefik.http.services.fathom.loadbalancer.server.port=8080"
volumes:
- "fathom:/app/data"
volumes:
frontend:
data:
fathom: