-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (35 loc) · 1012 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.8'
services:
expect-artist:
build: ./
command: ./wait-for-postgres.sh ${DB_HOST} ./expect-artist ${DB_USERNAME} ${DB_NAME}
ports:
- 80:80
depends_on:
- db-expect-artist
- migrate-expect-artist
environment:
- DB_PORT=${DB_PORT}
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USERNAME=${DB_USERNAME}
- DB_PASSWORD=${DB_PASSWORD}
- TOKEN=${TOKEN}
db-expect-artist:
restart: always
image: postgres:13
volumes:
- ./.database/postgres/data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- 5432:5432
migrate-expect-artist:
image: migrate/migrate
volumes:
- ./schema:/schema
command: ["-path", "/schema", "-database", "postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable", "up"]
depends_on:
- db-expect-artist