-
Notifications
You must be signed in to change notification settings - Fork 52
/
docker-compose.yml
50 lines (46 loc) · 1.04 KB
/
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
46
47
48
49
50
version: "3.8"
services:
web:
build: ./
environment:
- POSTGRES_HOST=db
- NEXT_TELEMETRY_DISABLED=1
- REDIS_HOST=cache
- REDIS_PORT=6379
ports:
- "3000:3000"
- "4000:4000"
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
links:
- db
- cache
db:
image: kartoza/postgis:15
ports:
- "5433:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASS=postgres
restart: on-failure
healthcheck:
test: "PGUSER=$$POSTGRES_USER PGPASSWORD=$$POSTGRES_PASS PGHOST=localhost pg_isready"
# TODO: enable start_interval once docker 25.0.0 is released
# https://github.com/moby/moby/issues/45897
# start_period: 60s
# start_interval: 5s
cache:
image: redis:6.2-alpine
restart: always
ports:
- "6379:6379"
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
volumes:
cache:
driver: local