-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
46 lines (44 loc) · 951 Bytes
/
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
version: '3.8'
volumes:
pgdata:
driver: local
services:
db:
container_name: ewallet-db
image: postgres
restart: always
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
env_file:
.env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER} ewallet" ]
interval: 5s
timeout: 5s
retries: 5
migrate:
image: migrate/migrate
restart: on-failure
env_file:
- .env
volumes:
- ./schema/postgresql:/migrations
command: [ "-path", "/migrations", "-database", "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable", "up" ]
depends_on:
- db
links:
- db
app:
container_name: ewallet-app
restart: on-failure
depends_on:
- db
image: ewallet:latest
ports:
- "8080:8080"
volumes:
- ./configs:/app/configs
env_file:
- .env