forked from bitrixdock/bitrixdock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
139 lines (133 loc) · 3.32 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
135
136
137
138
139
volumes:
db:
driver: local
cache:
driver: local
networks:
bitrixdock:
services:
certbot:
image: adferrand/dnsrobocert
hostname: certbot
container_name: certbot
volumes:
- ./private/letsencrypt:/etc/letsencrypt
# needed for nginx container autorestart, https://dnsrobocert.readthedocs.io/en/latest/configuration_reference.html#autorestart
- /var/run/docker.sock:/var/run/docker.sock
# should be in the following format:
# https://dnsrobocert.readthedocs.io/en/latest/user_guide.html#configuration
- ./ssl/dnsrobocert.yml:/etc/dnsrobocert/config.yml
# For yandexcloud:
# AUTH_KEY must be provided, short-lived and set by scripts/update-dns-token.sh
# DNS_ZONE_ID from https://console.cloud.yandex.com/link/dns or
# CLOUD_ID, FOLDER_ID from https://console.cloud.yandex.com/cloud can be provided
env_file: .env
# used in config/dnsrobocert.yml
environment:
- PROVIDER=./${PROVIDER}
- EMAIL=./${EMAIL}
- DOMAIN=./${DOMAIN}
logging:
driver: json-file
options:
max-size: "10m"
max-file: "5"
restart: unless-stopped
php:
build: ./${PHP_VERSION}
container_name: php
volumes_from:
- source
links:
- db
- memcached
environment:
- TZ=Europe/Moscow
stdin_open: true
tty: true
networks:
- bitrixdock
restart: unless-stopped
web_server:
build: ./${WEB_SERVER_TYPE}
container_name: web_server
depends_on:
- source
volumes_from:
- source
ports:
- '${INTERFACE}:80:80'
- '${INTERFACE}:443:443'
links:
- php
networks:
- bitrixdock
environment:
- TZ=Europe/Moscow
stdin_open: true
tty: true
restart: unless-stopped
db:
build: ./${DB_SERVER_TYPE}
container_name: db
volumes:
- ./${DB_SERVER_TYPE}/init:/docker-entrypoint-initdb.d
volumes_from:
- source
ports:
- '${INTERFACE}:3306:3306'
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
TZ: Europe/Moscow
command: mysqld --user=root --sql-mode=""
networks:
- bitrixdock
stdin_open: true
tty: true
restart: unless-stopped
memcached:
image: memcached:latest
container_name: memcached
volumes_from:
- source
ports:
- '${INTERFACE}:11211:11211'
networks:
- bitrixdock
environment:
- TZ=Europe/Moscow
stdin_open: true
tty: true
restart: unless-stopped
adminer:
image: dockette/adminer:full
container_name: adminer
links:
- db:db
ports:
- '${INTERFACE}:8080:80'
environment:
UPLOAD: 1024M # upload_max_filesize, post_max_size
TZ: Europe/Moscow
restart: unless-stopped
stdin_open: true
tty: true
networks:
- bitrixdock
source:
image: alpine:latest
container_name: source
volumes:
- ./logs/${WEB_SERVER_TYPE}:/var/log/${WEB_SERVER_TYPE}
- ./logs/php:/var/log/php
- ./logs/db:/var/log/mysql
- ./logs/memcached:/var/log/memcached
- db:/var/lib/mysql
- cache:/var/lib/memcached
- ${SITE_PATH}:/var/www/bitrix
- /etc/localtime:/etc/localtime/:ro
networks:
- bitrixdock