-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (45 loc) · 997 Bytes
/
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
services:
base: &base
build: .
depends_on:
db:
condition: service_healthy
environment:
- HTTP_SERVER_PORT=80
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PWD=postgres
- DB_NAME=floor_finder
floor_finder:
<<: *base
ports:
- 8055:80
unit_test:
<<: *base
build:
context: .
target: dev
command: "go test"
volumes:
- .:/usr/local/src/floor_finder/
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PWD=postgres
- DB_NAME=floor_finder_test
db:
image: postgis/postgis:14-3.2-alpine
command: ["postgres", "-c", "log_statement=all"]
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 54320:5432
volumes:
- ./init_dbs.sh:/docker-entrypoint-initdb.d/init_dbs.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 10