-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
51 lines (48 loc) · 1.75 KB
/
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
51
services:
planes-tracker:
image: "planes-tracker:latest"
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?error}"
POSTGRES_DB: ${POSTGRES_DB:-${POSTGRES_USER:-postgres}}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_TIMEZONE: ${POSTGRES_TIMEZONE:-UTC}
TRACKER_POLL_RATE: ${TRACKER_POLL_RATE:-10}
TRACKER_DEBUG: ${TRACKER_DEBUG:-false}
TRACKER_LOCATION_LATITUDE: ${TRACKER_LOCATION_LATITUDE:?error}
TRACKER_LOCATION_LONGITUDE: ${TRACKER_LOCATION_LONGITUDE:?error}
TRACKER_RADIUS_DISTANCE: ${TRACKER_RADIUS_DISTANCE:?error}
db:
image: "postgres:16.3-alpine"
container_name: postgres
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?error}"
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
- /home/planes-tracker/db/pg_hba.conf:/etc/postgresql/pg_hba.conf
expose:
- "5432"
ports:
- ${EXTERNAL_POSTGRES_PORT:-5432}:5432
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}",
]
start_period: 10s
interval: 5s
timeout: 5s
retries: 5
volumes:
pgdata: