-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 894 Bytes
/
docker-compose.yml
File metadata and controls
43 lines (40 loc) · 894 Bytes
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
services:
db:
image: postgres:15
container_name: scorefrost-db
env_file: .env
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDB}
ports:
- "${PGPORT}:${PGPORT}"
volumes:
- scorefrost-data:/var/lib/postgresql/data
api:
container_name: scorefrost-api
build: .
env_file: .env
environment:
- PGHOST=db
- DOCKER_ENV=true
ports:
- "${API_PORT}:${API_PORT}"
depends_on:
- db
migrate:
image: migrate/migrate:4
env_file: .env
volumes:
- ./sql/migrations:/migrations:ro
entrypoint: ["/bin/sh", "-lc"]
command:
- >
migrate
-path=/migrations
-database "postgres://$${PGUSER}:$${PGPASSWORD}@db:$${PGPORT}/$${PGDB}?sslmode=disable"
up
depends_on:
- db
volumes:
scorefrost-data: