forked from iloveitaly/docker-hosts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (34 loc) · 988 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (34 loc) · 988 Bytes
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
# ports are not exposed locally, instead dynamic orb domains are used to avoid clobbering localhost ports
services:
# port 5432
postgres:
image: postgres:latest
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: development
ports:
- ${CI:+5432}:5432
volumes:
- app_postgres_data:/var/lib/postgresql/
healthcheck:
# if you customize the default user at all, this healthcheck with clutter your logs
# since the default username + database does not match up
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 2s
timeout: 5s
retries: 3
# port 6379
redis:
image: redis:latest
restart: always
ports:
- ${CI:+6379}:6379
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 2s
timeout: 5s
retries: 3
volumes:
# NOTE redis data is not persisted, assumed to be ephemeral
app_postgres_data: