-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
64 lines (60 loc) · 1.37 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Learn more: https://docs.docker.com/compose/reference/
#
# Build images: docker-compose build
# Start app: docker-compose up borda
# Start database: docker-compose up db
# Import tasks: docker-compose up import-tasks
# Stop all: docker-compose down (add -v to wipe db)
#
version: "3.9"
services:
borda:
image: borda-api-server
container_name: borda-api-server
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
env_file:
- .env
depends_on:
- db
import-tasks:
image: borda-api-server:latest
build:
context: .
environment:
- .env
depends_on:
- db
command: ["import-tasks",
"--token", "${GITHUB_ACCESS_TOKEN}",
"--repo", "${TASK_REPOSITORY_URL}",
"--db", "${DATABASE_URL}"]
db:
container_name: postgres
image: postgres:latest
volumes:
# Permission denied when creating db
# https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker
- ./.postgres/data:/var/lib/postgresql/data:Z
ports:
- "5432:5432"
env_file:
- .env
pgweb:
container_name: pgweb
image: sosedoff/pgweb
restart: on-failure
ports:
- "8081:8081"
environment:
DATABASE_URL: "${DATABASE_URL}"
depends_on:
- db
#networks:
# backend:
#
#volumes:
# db-data: