-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose-common.yml
68 lines (63 loc) · 1.74 KB
/
docker-compose-common.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
networks:
ozone:
web:
external: true
services:
env-substitution:
image: mekomsolutions/env-substitution
networks:
- ozone
restart: on-failure
volumes:
- "${DISTRO_PATH}:/opt/env-substitution/files"
mysql:
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed
- --log-bin=mysqld-bin
- --binlog-format=ROW
- --server-id=2
- --sync-binlog=1
- --binlog-annotate-row-events=0
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
healthcheck:
test: "exit 0"
image: mariadb:10.8
networks:
- ozone
ports:
- "3306:3306"
restart: unless-stopped
volumes:
- "${MYSQL_DATADIR:-mysql-data}:/var/lib/mysql"
- "${SQL_SCRIPTS_PATH}/mysql/create_db.sh:/docker-entrypoint-initdb.d/create_db.sh"
labels:
restic-compose-backup.mariadb: true
postgresql:
command: postgres -c wal_level=logical -c max_wal_senders=10 -c max_replication_slots=10 -c max_connections=200
environment:
POSTGRES_DB: postgres
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
image: postgres:13
networks:
- ozone
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- "${POSTGRES_DATADIR:-postgresql-data}:/var/lib/postgresql/data"
- "${SQL_SCRIPTS_PATH}/postgresql/create_db.sh:/docker-entrypoint-initdb.d/create_db.sh"
labels:
restic-compose-backup.postgres: true
volumes:
mysql-data: ~
postgresql-data: ~