-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (35 loc) · 878 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (35 loc) · 878 Bytes
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
version: '3.8'
services:
postgres:
image: postgis/postgis:15-3.4
restart: always
environment:
POSTGRES_DB: disasters_test
POSTGRES_USER: disasters
POSTGRES_PASSWORD: disasters_pass
POSTGRES_HOST_AUTH_METHOD: password
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-postgis.sql:/docker-entrypoint-initdb.d/init-postgis.sql:ro
api:
build: .
depends_on:
- postgres
environment:
- POSTGRES_URI=postgresql://disasters:disasters_pass@postgres:5432/disasters_test
- NODE_ENV=test
ports:
- '3000:3000'
restart: always
volumes:
- .:/usr/src/app
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3000/api-docs']
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
postgres_data: