-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
62 lines (60 loc) · 1.64 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
version: '3.7'
services:
db:
image: mariadb:10.4
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${MARIADB_ROOT_PASSWORD}
expose:
- "3306"
volumes:
- db_data:/var/lib/mysql
app:
build: .
restart: always
volumes:
# - ./config/php:/usr/local/etc/php/conf.d
- ./config/vhosts:/etc/apache2/sites-enabled
- ./html:/var/www/html
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=Host(`ensembletn.localhost`)
- traefik.http.routers.app.entrypoints=web
depends_on:
- db
pma:
image: phpmyadmin/phpmyadmin
restart: always
environment:
PMA_HOST: db
MYSQL_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD}
labels:
- traefik.enable=true
- traefik.http.routers.pma.rule=Host(`pma.ensembletn.localhost`)
- traefik.http.routers.pma.entrypoints=web
depends_on:
- db
traefik:
container_name: "traefik"
image: traefik:v2.0
restart: always
command:
- "--log.level=INFO"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
labels:
- traefik.enable=true
- traefik.http.routers.traefik.rule=Host(`monitor.ensembletn.localhost`)
- traefik.http.routers.traefik.entrypoints=web
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
db_data: