-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
41 lines (38 loc) · 853 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
version: "3.4"
services:
golang:
tty: true
image: golang:1.19
volumes:
- .:/app/src/service/api
working_dir: /app/src/service/api
env_file:
- .env
command: bash -c "go install github.com/cosmtrek/air@latest && air -c
/app/src/service/api/air.toml ."
expose:
- "${API_PORT}"
ports:
- "${API_PORT}:${API_PORT}"
depends_on:
- database
links:
- database
database:
image: "postgres:13"
expose:
- "${POSTGRES_PORT}"
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
environment:
LC_ALL: C.UTF-8
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- data:/var/lib/postgresql/data
env_file:
- .env
command: -p ${POSTGRES_PORT}
volumes:
data: