-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (58 loc) · 1.35 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: "3.8"
services:
api:
container_name: api
image: golang:1.17
restart: on-failure
volumes:
- ./:/deuvox-be
working_dir: /deuvox-be
command: /bin/bash -c "go run cmd/main.go"
ports:
- "8080:8080"
env_file: .env
environment:
- SERVER_HOST=${SERVER_HOST}
- SERVER_PORT=${SERVER_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_ADDR=postgres
- JWT_ALG=${JWT_ALG}
- JWT_SIGN=${JWT_SIGN}
depends_on:
- postgres
- adminer
- migrate
postgres:
container_name: postgres
image: postgres:alpine
restart: on-failure
ports:
- "5431:5432"
env_file: .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
adminer:
container_name: adminer
image: adminer:standalone
restart: on-failure
ports:
- "8081:8080"
migrate:
image: migrate/migrate
restart: on-failure
volumes:
- ./sql/migrations:/migrations
command:
[
'-path',
'/migrations',
'-database',
'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}?sslmode=disable',
'up',
]
depends_on:
- postgres