-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
88 lines (87 loc) · 2.63 KB
/
docker-compose.yml
File metadata and controls
88 lines (87 loc) · 2.63 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: hhc-shared-stack
services:
hhc-api:
build:
context: ./services/api
# target: development
# command: dlv debug /opt/go/src --accept-multiclient --headless --listen ":2345" --continue
container_name: hhc-api
networks:
- hhc-network
restart: always
environment:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE # local dev only using aws-sdk-go-v2
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY # local dev only using aws-sdk-go-v2
AWS_DEFAULT_REGION: us-east-1 # local dev only using aws-sdk-go-v2
AWS_DISABLE_SSL: true # local dev only using aws-sdk-go-v2
AWS_ENDPOINT_URL: http://minio:9000
USE_PATH_STYLE: true
PGUSER: hhc_shared_user
PGPASSWORD: hhc_shared_pass
PGDATABASE: postgres
PGHOST: hhc-db
PGSSLMODE: disable # api config defaults to 'require'
PGX_POOL_MAXCONNS: 10
PGX_POOL_MINCONNS: 5
PGX_POOL_MAXCONN_IDLETIME: 30m
S3_BUCKET: hhc-shared-dev
S3_DEFAULT_INDEX: index.html
S3_PREFIX_STATIC: /shared/ui
API_PORT: 8080
API_LOG: true
# ports:
# - "8080:8080"
# - "2345:2345"
volumes:
- ./services/api:/opt/go/src:rw
depends_on:
hhc-db:
condition: service_started
hhc-migration:
condition: service_completed_successfully
# --------------------------------------
hhc-db:
platform: linux/amd64
image: postgis/postgis:latest
container_name: hhc-db
networks:
- hhc-network
restart: always
environment:
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 1s
retries: 5
# --------------------------------------
hhc-migration:
build:
context: ./services/migration
args:
- GEOM_VERSION=v0.1.1 # v0.1.1 is the default in the dockerfile
container_name: hhc-migration
networks:
- hhc-network
restart: on-failure
# entrypoint: ["sleep", "infinity"] # use this to jump into the container to check things
environment:
FLYWAY_DEFAULT_SCHEMA: hhc
FLYWAY_USER: postgres
FLYWAY_PASSWORD: postgres
FLYWAY_URL: jdbc:postgresql://hhc-db:5432/postgres
FLYWAY_VALIDATE_MIGRATION_NAMING: true
PGHOST: hhc-db
FLYWAY_PLACEHOLDERS_APP_USER: hhc_shared_user
FLYWAY_PLACEHOLDERS_APP_PASSWORD: hhc_shared_pass
volumes:
- ./services/migration/local:/flyway/sql/local:ro
depends_on:
hhc-db:
condition: service_healthy
# --------------------------------------
networks:
hhc-network:
name: hhc-network