-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
40 lines (38 loc) · 966 Bytes
/
docker-compose.yaml
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
services:
db:
image: postgres:15-alpine
container_name: mizdb-postgres
volumes:
- "$DATA_DIR:/var/lib/postgresql/data"
- "$BACKUP_DIR:/var/lib/mizdb/backups"
# Mount the directory that contains the restore and dump scripts:
- ./scripts/db:/mizdb
environment:
POSTGRES_DB: mizdb
POSTGRES_USER: mizdb_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
restart: unless-stopped
secrets:
- db_password
healthcheck:
test: ["CMD", "pg_isready"]
interval: 5s
shm_size: 128mb
web:
build: .
container_name: mizdb-app
volumes:
- "$LOG_DIR:/var/log/mizdb"
env_file:
- .env
ports:
- 80:8000
depends_on:
db:
condition: service_healthy
restart: unless-stopped
entrypoint: ["/mizdb/docker-entrypoint.sh"]
command: ["/etc/mizdb-server/apachectl", "start", "-DFOREGROUND"]
secrets:
db_password:
file: .passwd