forked from ether/etherpad-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.51 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
version: '3.3'
services:
# The container that runs Etherpad.
app:
build: .
image: ptbpst1/etherpad:latest
depends_on:
- etherpad-db
env_file:
- ./etherpad.env
expose:
- ${PORT}
# Default values defined in .env file.
# The DB_TYPE/DB_HOST/DB_PORT/DB_NAME/DB_USER/DB_PASS/DB_CHARSET variables are
# used in the settings.json.docker.
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
networks:
- bridge
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT}"]
interval: 1m30s
timeout: 10s
# The container that runs the database (mysql).
etherpad-db:
image: "mysql:5.7"
container_name: ${DB_HOST}
volumes:
- type: volume
source: db
target: /var/lib/mysql
# Configure the MySQL database and create a user with provided name/password.
# See https://hub.docker.com/_/mysql/ for more details.
# Default values defined in .env file.
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_USER=${DB_USER}
- MYSQL_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=${DB_NAME}
- DB_CHARSET=${DB_CHARSET}
command: ['mysqld', '--character-set-server=${DB_CHARSET}',
'--collation-server=utf8mb4_unicode_ci',
'--explicit_defaults_for_timestamp=ON']
networks:
- bridge
restart: always
volumes:
db: {}
networks:
bridge:
driver: bridge