-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
53 lines (51 loc) · 1.19 KB
/
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
51
52
53
services:
api:
build:
context: .
dockerfile: ./docker/dev/golang/Dockerfile
restart: unless-stopped
container_name: fd-api
command: wgo run main.go gin-server
stdin_open: true
tty: true
env_file:
- path: ./.env
- path: ./.env.local
required: false
ports:
- 5000:5000
volumes:
- ./api:/usr/src/app
depends_on:
- postgres
healthcheck:
test: curl --silent --fail http://localhost:5000/healthz || exit 1
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
postgres:
image: postgres:16
restart: unless-stopped
container_name: fd-postgres
environment:
POSTGRES_USER: "${DB_USER:?err}"
POSTGRES_PASSWORD: "${DB_PASSWORD:?err}"
POSTGRES_DB: "${DB_NAME:?err}"
volumes:
- ./data/postgresql:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_PASSWORD}"]
interval: 10s
timeout: 20s
retries: 5
start_period: 60s
adminer:
image: adminer:latest
container_name: fd-adminer
restart: unless-stopped
ports:
- 8080:8080
depends_on:
- api
- postgres