-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (42 loc) · 964 Bytes
/
docker-compose.yml
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
---
version: "3.8"
services:
postgres:
image: postgres:15.3
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./pg_data:/var/lib/postgresql/data
ports:
- '5432:5432'
migration:
image: migrate/migrate
volumes:
- ./migrations:/migrations
entrypoint:
[
"migrate",
"-path",
"/migrations",
"-database",
"postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable",
]
command: ["up"]
depends_on:
postgres:
condition: service_healthy
restart: on-failure
nats:
command: ["nats-streaming-server", "-cid", "test-cluster"]
image: nats-streaming:0.25.6-alpine3.18
restart: always
ports:
- "4222:4222"
- "8222:8222"