-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
130 lines (118 loc) · 4.4 KB
/
docker-compose.dev.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
services:
# https://doc.traefik.io/traefik/
global-traefik:
image: traefik:v2.10
restart: ${RESTART:-unless-stopped}
labels:
# If you want to use traefik interface over a domain, enable it
- traefik.enable=true
- traefik.http.routers.global-traefik.rule=Host(`traefik.localhost`)
- traefik.http.services.global-traefik.loadbalancer.server.port=8080
# TLS
- traefik.http.routers.global-traefik.entrypoints=websecure
- traefik.http.routers.global-traefik.tls=true
# Protect the access by a username and a password
# htpasswd -nb admin "password" | sed -e s/\\$/\\$\\$/g
# docker run --rm httpd:2.4-alpine htpasswd -nbB admin "password" | sed -e s/\\$/\\$\\$/g
#- traefik.http.routers.global-traefik.middlewares=auth
#- traefik.http.middlewares.auth.basicauth.users=admin:$$apr1$$rCspsSTs$$oVNKLMVJIwtuLpYtPuXwt1
ports:
- "${HTTP_IP:-127.0.0.1}:${HTTP_PORT:-80}:80"
- "${HTTPS_IP:-127.0.0.1}:${HTTPS_PORT:-443}:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/traefik.dev.yaml:/etc/traefik/traefik.yaml:ro
- ./.docker/traefik/acme/:/etc/traefik/acme/
- ./.docker/traefik/certs/:/etc/traefik/certs/
healthcheck:
test:
- CMD
- traefik
- healthcheck
interval: 10s
timeout: 5s
retries: 3
depends_on:
- global-serviceError
global-serviceError:
image: httpd:alpine
restart: always
hostname: status
container_name: global-serviceError
volumes:
- ./traefik/status-pages/public:/usr/local/apache2/htdocs
labels:
- traefik.enable=true
- traefik.http.routers.status-pages.rule=HostRegexp(`{host:.+}`)
- traefik.http.routers.status-pages.priority=1
#- traefik.http.routers.status-pages.entrypoints=web
- traefik.http.routers.status-pages.middlewares=status-pages@file
# TLS
- traefik.http.routers.status-pages.entrypoints=websecure
- traefik.http.routers.status-pages.tls=true
#- traefik.http.routers.status-pages.tls.certresolver=letsEncrypt
global-db:
image: mariadb:10.11
restart: ${RESTART:-unless-stopped}
ports:
- "${DB_IP:-127.0.0.1}:${DB_PORT:-3306}:3306"
volumes:
- ./.docker/global-db:/var/lib/mysql
environment:
- MARIADB_ROOT_PASSWORD=root
- MARIADB_AUTO_UPGRADE=1
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-allowed-packet=16MB --sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# https://mailpit.axllent.org/
global-mail:
image: axllent/mailpit
restart: ${RESTART:-unless-stopped}
ports:
- "${SMTP_PORT:-1025}:1025"
labels:
- traefik.enable=true
- "traefik.http.routers.global-mail.rule=Host(`mail.localhost`)"
- traefik.http.services.global-mail.loadbalancer.server.port=8025
# TLS
- traefik.http.routers.global-mail.entrypoints=websecure
- traefik.http.routers.global-mail.tls=true
depends_on:
global-traefik:
condition: service_healthy
# https://www.portainer.io/
global-portainer:
image: portainer/portainer-ce
restart: ${RESTART:-unless-stopped}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./.docker/global-portainer:/data
labels:
- traefik.enable=true
- "traefik.http.routers.global-portainer.rule=Host(`portainer.localhost`)"
- traefik.http.services.global-portainer.loadbalancer.server.port=9000
# TLS
- traefik.http.routers.global-portainer.entrypoints=websecure
- traefik.http.routers.global-portainer.tls=true
depends_on:
global-traefik:
condition: service_healthy
# https://dozzle.dev/
global-dozzle:
image: amir20/dozzle:latest
restart: ${RESTART:-unless-stopped}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#- ./.docker/global-dozzle:/data
labels:
- traefik.enable=true
- "traefik.http.routers.global-dozzle.rule=Host(`dozzle.localhost`)"
- traefik.http.services.global-dozzle.loadbalancer.server.port=8080
# TLS
- traefik.http.routers.global-dozzle.entrypoints=websecure
- traefik.http.routers.global-dozzle.tls=true
depends_on:
global-traefik:
condition: service_healthy
networks:
default:
external: true
name: global