-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
112 lines (93 loc) · 3.39 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
version: '3.7'
services:
# adminer:
# image: adminer
# restart: always
# depends_on:
# - db
# ports:
# - 8080:8080
db:
restart: unless-stopped
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
# MYSQL_USER: $MYSQL_USER
# MYSQL_PASSWORD: $MYSQL_PASSWORD
volumes:
- ./mysql:/var/lib/mysql:rw
# - ./config/mysql:/etc/mysql/conf.d:ro
- ./config/dump:/docker-entrypoint-initdb.d:ro
# command: --character-set-server=utf8 --collation-server=utf8_general_ci --default-authentication-plugin=mysql_native_password
# ports:
# - "3306:3306"
networks:
- backend
blog:
restart: unless-stopped
build: .
labels:
- "traefik.enable=true"
- "traefik.http.routers.blog.entrypoints=http"
- "traefik.http.routers.blog.rule=Host(`blog.m4rr.ru`)"
# - "traefik.http.routers.blog.rule=Host(`blog.m4rr.ru`) || Host(`m4rr.ru`) && PathPrefix(`/blog/`)"
- "traefik.http.routers.blog.service=blog@docker"
- "traefik.http.services.blog.loadbalancer.passhostheader=true"
# - "traefik.http.middlewares.blog-strip-prefix.stripprefix.prefixes=/blog"
# - "traefik.http.routers.blog.middlewares=blog-strip-prefix@docker"
networks:
- traefik
- backend
environment:
VIRTUAL_HOST: blog.m4rr.ru
APACHE_LOG_DIR: /var/log/apache2
depends_on:
- db
volumes:
- ./data/audio:/var/www/html/audio
- ./data/pictures:/var/www/html/pictures
- ./data/user:/var/www/html/user
- ./data/static/favicon.ico:/var/www/html/favicon.ico
- ./config/php/php.ini-production:/usr/local/etc/php/php.ini
- ./config/php/settings.ini:/usr/local/etc/php/conf.d/settings.ini
- ./config/php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
- ./config/php/vhost.conf:/etc/apache2/sites-enabled/000-blog.m4rr.ru.conf
- ~/apache2/logs:/var/log/apache2/
# blog2:
# restart: unless-stopped
# privileged: true
# build: .
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.blog2.entrypoints=http"
# #- "traefik.http.routers.blog.rule=Host(`blog.m4rr.ru`)"
# - "traefik.http.routers.blog2.rule=Host(`m4rr.ru`) && PathPrefix(`/blog/`)"
# - "traefik.http.routers.blog2.service=blog2@docker"
# - "traefik.http.services.blog2.loadbalancer.passhostheader=true"
# # - "traefik.http.middlewares.blog-strip-prefix.stripprefix.prefixes=/blog"
# # - "traefik.http.routers.blog2.middlewares=blog-strip-prefix@docker"
# networks:
# - traefik
# - backend
# environment:
# VIRTUAL_HOST: m4rr.ru
# APACHE_LOG_DIR: /var/log/apache2
# depends_on:
# - db
# volumes:
# - ./data/audio:/var/www/html/audio
# - ./data/pictures:/var/www/html/pictures
# - ./data/user:/var/www/html/user
# - ./data/static/favicon.ico:/var/www/html/favicon.ico
# - ./config/php/php.ini-production:/usr/local/etc/php/php.ini
# - ./config/php/settings.ini:/usr/local/etc/php/conf.d/settings.ini
# - ./config/php/uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
# - ./config/php/vhost.conf:/etc/apache2/sites-enabled/000-blog.m4rr.ru.conf
# - ~/apache2/logs:/var/log/apache2/
networks:
traefik:
external:
name: traefik
backend:
internal: true