forked from allisson/postmand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
67 lines (63 loc) · 1.55 KB
/
docker-compose-dev.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3.8'
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", $POSTGRES_DB]
interval: 10s
timeout: 5s
retries: 5
migrate:
build: .
environment:
POSTMAND_DATABASE_URL: ${POSTMAND_DATABASE_URL}
command: migrate
depends_on:
postgres:
condition: service_healthy
links:
- postgres
extra_hosts:
- "host.docker.internal:host-gateway"
worker:
build: .
environment:
POSTMAND_DATABASE_URL: ${POSTMAND_DATABASE_URL}
POSTMAND_POLLING_INTERVAL: ${POSTMAND_POLLING_INTERVAL}
POSTMAND_DATABASE_MAX_OPEN_CONNS: ${POSTMAND_DATABASE_MAX_OPEN_CONNS}
command: worker
ports:
- "8100:8000"
- "8101:8001"
depends_on:
postgres:
condition: service_healthy
links:
- postgres
extra_hosts:
- "host.docker.internal:host-gateway"
server:
build: .
environment:
POSTMAND_DATABASE_URL: ${POSTMAND_DATABASE_URL}
POSTMAND_DATABASE_MAX_OPEN_CONNS: ${POSTMAND_DATABASE_MAX_OPEN_CONNS}
command: server
ports:
- "8000:8000"
- "8001:8001"
depends_on:
postgres:
condition: service_healthy
links:
- postgres
extra_hosts:
- "host.docker.internal:host-gateway"