-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
95 lines (89 loc) · 1.93 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3.9"
services:
db:
profiles:
- dev
- testing
image: mongo:latest
# comment the following line if you want output from the database
command: --quiet --logpath /dev/null
volumes:
- mongo-data:/data/
environment:
- MONGO_INITDB_ROOT_USERNAME=mongoadmin
- MONGO_INITDB_ROOT_PASSWORD=mongopassword
backend:
profiles:
- dev
build:
context: ./
dockerfile: Dockerfiles/Dockerfile.backend
target: dev
environment:
FLASK_DEBUG: 1
DEV_LOGIN: 1
FLASK_APP: form_manager
TZ: Europe/Stockholm
depends_on:
- db
restart: on-failure
volumes:
- type: bind
source: ./form_manager
target: /code/form_manager
frontend:
profiles:
- dev
build:
context: ./
dockerfile: Dockerfiles/Dockerfile.frontend
target: dev
restart: on-failure
environment:
VERSION: "dev"
volumes:
- type: bind
source: ./frontend/src
target: /code/src
proxy:
profiles:
- dev
image: nginxinc/nginx-unprivileged:alpine
ports:
- 127.0.0.1:5050:8080
depends_on:
- backend
- frontend
- db
volumes:
- type: bind
source: ./Dockerfiles/nginx.conf.dev
target: /etc/nginx/conf.d/default.conf
test:
build:
context: ./
dockerfile: Dockerfiles/Dockerfile.backend
target: test
command: sh -c "pytest --color=yes --cov=./form_manager --cov-report=xml:test/coverage/report.xml"
environment:
DEV_LOGIN: 1
profiles:
- testing
depends_on:
- db
restart: "no"
volumes:
- type: bind
source: ./test
target: /code/test
- type: bind
source: ./form_manager
target: /code/form_manager
mailcatcher:
profiles:
- dev
image: sj26/mailcatcher:latest
ports:
- 127.0.0.1:1080:1080
volumes:
mongo-data: {}