-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
47 lines (44 loc) · 1.03 KB
/
docker-compose.yaml
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: "2.1"
networks:
tg:
services:
tg-api:
container_name: tg-api
build:
context: .
dockerfile: Dockerfile
restart: always
environment:
- API_HOST=tg-api
- API_PORT=8080
- API_AUTHENTICATION_SECRET=SD7C6STODRUY7CVJOQDENRDXXOBEBAWAKJI6EEMTR4XF54NYGUNYVREA
- API_DATABASE_NAME=api_db
- API_DATABASE_HOST=postgres
- API_DATABASE_PORT=5432
- API_DATABASE_USER=postgres
- API_DATABASE_PASSWORD=1234567
- API_DATABASE_SSL=disable
ports:
- 8080:8080
command: bash -c "./go-tg-api migrate up && ./go-tg-api run"
depends_on:
postgres:
condition: service_healthy
networks:
- tg
postgres:
container_name: postgres
image: postgres:10
environment:
- POSTGRES_DB=api_db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=1234567
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tg