-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (53 loc) · 1.22 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
version: "3.1"
services:
backend:
build:
context: backend
dockerfile: Dockerfile
ports:
- 4999:5000
working_dir: /app
volumes:
- ./backend:/app
environment:
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
HOST: db
PASSWORD: ${PASSWORD}
DB_PORT: ${DB_PORT}
db-fill-or-update-tables:
build:
context: ./database
dockerfile: Dockerfile_fill_or_update_tables
volumes:
- ./backend/challenges:/app/challenges
- ./database/fill_or_update_tables.py:/app/fill_or_update_tables.py
- ./database/sql:/app/sql
environment:
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
HOST: db
PASSWORD: ${PASSWORD}
DB_PORT: ${DB_PORT}
db:
image: postgres
restart: always
build:
context: .
environment:
POSTGRES_PASSWORD: ${PASSWORD}
POSTGRES_USER: ${DB_USER}
POSTGRES_DB: ${DB_NAME}
volumes:
- ./backend/challenges:/challenges
- ./database/sql_scripts:/sql_scripts
- dataframetrainer_postgres:/var/lib/postgresql/data
ports:
- "${DB_PORT}:5432"
adminer:
image: adminer
restart: always
ports:
- 8081:8080
volumes:
dataframetrainer_postgres: