-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (86 loc) · 2.23 KB
/
docker-compose.yml
File metadata and controls
94 lines (86 loc) · 2.23 KB
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
version: "3.8"
services:
postgres:
image: postgres:16
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets:
- postgres_password
volumes:
- postgres_main:/var/lib/postgresql/data
- ./configs/postgres/pg_hba.conf:/etc/postgresql-custom/pg_hba.conf
- ./configs/postgres/postgresql.conf:/etc/postgresql-custom/postgresql.conf
command: >
postgres -c config_file=/etc/postgresql-custom/postgresql.conf
ports:
- "5433:5432"
networks:
- app_network
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/mysql_root_password
MYSQL_PASSWORD_FILE: /run/secrets/mysql_password
secrets:
- mysql_root_password
- mysql_password
ports:
- "3307:3306"
volumes:
- mysql_main:/var/lib/mysql
- ./configs/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
networks:
- app_network
redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- ./configs/redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
networks:
- app_network
# dbmate_postgres:
# image: amacneil/dbmate:latest
# depends_on:
# - postgres
# environment:
# DATABASE_URL: ${DATABASE_URL}
# volumes:
# - ./migrations/${DB_NAME}:/db/migrations
# command: ["up"]
# networks:
# - app_network
# backup_service:
# image: amazon/aws-cli:latest
# container_name: postgres_backup
# secrets:
# - aws_access_key_id
# - aws_secret_access_key
# environment:
# AWS_DEFAULT_REGION: ${AWS_REGION}
# AWS_ACCESS_KEY_ID_FILE: /run/secrets/aws_access_key_id
# AWS_SECRET_ACCESS_KEY_FILE: /run/secrets/aws_secret_access_key
# volumes:
# - ./backup:/backup
# entrypoint: ["sh", "-c", "/backup/backup.sh"]
# depends_on:
# - ${PG_CONTAINER_NAME}
# networks:
# - app_network
networks:
app_network:
volumes:
postgres_main:
mysql_main:
secrets:
postgres_password:
external: true
mysql_root_password:
external: true
mysql_password:
external: true
aws_access_key_id:
external: true
aws_secret_access_key:
external: true