-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
47 lines (43 loc) · 1.16 KB
/
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
41
42
43
44
45
46
47
services:
postgres:
image: postgres:16.1
container_name: folioblog_postgres
restart: always
environment:
POSTGRES_USER: ${FOLIOBLOG_POSTGRES_USER:-postgres}
POSTGRES_PASSWORD_FILE: /run/secrets/pg_passwd
POSTGRES_DB: ${FOLIOBLOG_POSTGRES_DB:-postgres}
ports:
- ${FOLIOBLOG_POSTGRES_PORT:-5432}:5432
healthcheck:
test: pg_isready -U ${FOLIOBLOG_POSTGRES_USER:-postgres} -d ${FOLIOBLOG_POSTGRES_DB:-postgres}
interval: 5s
secrets:
- pg_passwd
volumes:
- pg_data:/var/lib/postgresql/data
redis:
image: redis:7.2
container_name: folioblog_redis
restart: always
command: redis-server /etc/redis/redis.conf
environment:
REDIS_PASSWORD_FILE: /run/secrets/redis_passwd
ports:
- ${FOLIOBLOG_REDIS_PORT:-6379}:6379
secrets:
- redis_passwd
volumes:
- ./docker/local/redis:/etc/redis
- redis_data:/data
entrypoint: /etc/redis/entrypoint.sh
volumes:
pg_data:
name: folioblog_pg
redis_data:
name: folioblog_redis
secrets:
pg_passwd:
environment: FOLIOBLOG_POSTGRES_PASSWORD
redis_passwd:
environment: FOLIOBLOG_REDIS_PASSWORD