-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
42 lines (42 loc) · 1.1 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
version: "3"
services:
postgis:
image: postgis/postgis
profiles:
- "database"
restart: always
container_name: ${POSTGRES_CONTAINER}
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_SHARED_BUFFERS: ${POSTGRES_SHARED_BUFFERS} # 25% of available RAM recommended
command: postgres -c "max_connections=${POSTGRES_MAX_CONNECTIONS}"
ports:
- "${POSTGRES_PORT}:5432"
volumes:
# - ./config/postgres/postgresql.conf:/var/lib/postgresql/data/postgresql.conf
# - ./data:/var/lib/postgresql/data
- postgis_data:/var/lib/postgresql/data
- ./init:/docker-entrypoint-initdb.d
networks:
- app-network
healthcheck:
test:
[
"CMD",
"pg_isready",
"-q",
"-d",
"${POSTGRES_DB}",
"-U",
"${POSTGRES_USER}"
]
interval: 10s
timeout: 5s
retries: 5
networks:
app-network:
driver: bridge
volumes:
postgis_data: