-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (42 loc) · 931 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
version: "3.7"
services:
postgres:
image: "postgres:13"
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: pg_isready -U ${DB_USER} -d ${DB_DATABASE}
interval: 10s
timeout: 5s
retries: 5
ports:
- "${DB_PORT}:${DB_PORT}"
networks:
- default-net
app:
build:
context: .
image: hexagonal-go-architecture
env_file:
- .env
environment:
APP_MODE: "development"
APP_SERVER_PORT: ${PORT}
APP_DB_HOST: "postgres"
APP_DB_PORT: ${DB_PORT}
APP_DB_DATABASE: ${DB_DATABASE}
APP_DB_USER: ${DB_USER}
APP_DB_PASSWORD: ${DB_PASSWORD}
VERBOSE: 1
tty: true
entrypoint: ["/bin/app", "up"]
ports:
- "${PORT}:${PORT}"
networks:
- default-net
depends_on:
- postgres
networks:
default-net: