-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
134 lines (128 loc) · 4.03 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
name: modpipe
networks:
modpipe_traefik:
external: true
modpipe:
external: true
services:
modpipe-web:
build: .
container_name: modpipe_web
image: modpipe-web:latest
# ports:
# - 5000:5000
volumes:
- ./data:/data
- ./app:/flask/app
- ./static:/flask/static
command: /flask/start.sh
networks:
- modpipe_traefik
- modpipe
env_file:
- path: ./env
required: true
- path: ./overrides.env
required: false
depends_on:
- db
- traefik
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=modpipe_traefik'
- 'traefik.http.routers.modpipe-web.rule=Host(`modpipe.${DOMAIN:-example.com}`)'
- 'traefik.http.routers.modpipe-web.entryPoints=web'
- 'traefik.http.routers.modpipe-web.service=modpipe-web-entrypoint'
- 'traefik.http.services.modpipe-web-entrypoint.loadbalancer.server.port=5000'
modpipe-static:
container_name: modpipe_static
image: nginx:alpine
restart: always
volumes:
- ./static:/srv
- ./data/static/nginx.conf:/etc/nginx/conf.d/default.conf
- ./data/static/logs:/logs
networks:
- modpipe_traefik
depends_on:
- traefik
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=modpipe_traefik'
- 'traefik.http.routers.modpipe-static.rule=Host(`modpipe.${DOMAIN:-example.com}`) && PathPrefix(`/img`) || PathPrefix(`/css`) || PathPrefix(`/js`)'
- 'traefik.http.routers.modpipe-static.entryPoints=web'
- 'traefik.http.routers.modpipe-static.service=modpipe-static-entrypoint'
- 'traefik.http.services.modpipe-static-entrypoint.loadbalancer.server.port=80'
db:
container_name: modpipe_db
hostname: modpipe_db
image: postgres:16
restart: always
ports:
- 5432:5432
env_file:
- path: ./env
required: true
volumes:
- ./data/db:/data/db
networks:
- modpipe
adminer:
container_name: modpipe_adminer
image: adminer
restart: always
ports:
- 8080:8080
networks:
- modpipe
- modpipe_traefik
depends_on:
- db
- traefik
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=modpipe_traefik'
- 'traefik.http.routers.modpipe-adminer.rule=Host(`modpipe.${DOMAIN:-example.com}`) && PathPrefix(`/adminer`)'
- 'traefik.http.routers.modpipe-adminer.entryPoints=web'
- 'traefik.http.routers.modpipe-adminer.service=modpipe-adminer-entrypoint'
- 'traefik.http.services.modpipe-adminer-entrypoint.loadbalancer.server.port=8080'
whoami:
image: traefik/whoami
networks:
- modpipe_traefik
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.constraint-label=traefik
- traefik.http.routers.modpipe-whoami-http.rule=Host(`modpipe.jeandr.net`) && PathPrefix(`/whoami`)
- traefik.http.routers.modpipe-whoami-http.entrypoints=web
- traefik.http.services.modpipe-whoami.loadbalancer.server.port=80
traefik:
container_name: modpipe_traefik
image: traefik:v3.0
ports:
- 80:80
- 443:443
networks:
- modpipe_traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/letsencrypt:/letsencrypt
- ./data/log:/var/log
command:
- --api.dashboard=true
- --log.level=INFO
# - --log.filepath=/var/log/traefik.log
- --accesslog=true
- --accesslog.filepath=/var/log/traefik-access.log
- --providers.docker.network=modpipe_traefik
- --providers.docker.exposedByDefault=false
- --entrypoints.web.address=:80
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=modpipe_traefik'
- 'traefik.http.routers.mydashboard.rule=Host(`traefik.modpipe.${DOMAIN:-example.com}`)'
- 'traefik.http.routers.mydashboard.service=api@internal'
- 'traefik.http.routers.mydashboard.middlewares=myauth'
- 'traefik.http.middlewares.myauth.basicauth.users=admin:$$apr1$$yh36kr9w$$vpLPHqinbs96aO6OLon6X/'