-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
50 lines (48 loc) · 1.09 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
48
49
50
services:
app:
build:
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- database_dsn="postgres://user:pass@localhost:15432/portfello?sslmode=disable"
db:
image: bitnami/postgresql:latest
restart: always
ports:
- "15432:5432"
environment:
- POSTGRESQL_USER=user
- POSTGRESQL_PASSWORD=pass
- POSTGRESQL_DATABASE=portfello
volumes:
- db:/bitnami/postgresql
healthcheck:
test: "pg_isready -h db -U user"
interval: 1s
timeout: 5s
retries: 150
redis:
image: "bitnami/redis:latest"
ports:
- "16379:6379"
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
interval: 1s
timeout: 3s
retries: 5
nats:
image: "nats:alpine"
ports:
- "14222:4222"
- "16222:6222"
- "18222:8222"
healthcheck:
test: echo $$(wget --server-response http://nats:8222/varz 2>&1 | grep '200 OK') | grep '200' || exit 1
interval: 20s
timeout: 5s
retries: 5
volumes:
db: