This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
104 lines (95 loc) · 3.11 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
96
97
98
99
100
101
102
103
104
version: "3.4"
services:
# We use two images in development. One frontend that runs `vue-cli-service
# serve`, named `frontend` and one that runs django named `bev`. The frontend
# image proxies requests to django.
# In production only the django image is run. It will serve the production
# ready frontend code, but the files are only updated on docker build.
frontend:
build:
context: .
dockerfile: docker/Dockerfile
target: frontend
environment:
# `vue-cli-service serve` will proxy request to `/api` to this endpoint.
# Defined in `frontend/vue.config.js`.
- API_SERVER=http://bev:5000
- IDP_SERVER=http://idp:8080
# To reload on file changes, we mount the current folder into `/code`.
# However we do not want node_modules on the host machine, so we create an
# additional volume for it.
volumes:
- .:/code/
- /code/frontend/node_modules
depends_on:
- bev
ports:
- 8080:8080
bev:
build:
context: .
dockerfile: docker/Dockerfile
target: dist
# The `volumes` and `command` mounts the current directory in the docker
# container and overwrites the CMD from Dockerfile. With this gunicorn
# reloads on file changes. This is very useful when developing.
#
# You'll properly want to make `backend/core/migrations` writable by the
# user running inside the docker container. Run `chmod o+w migrations` on it
# to make it writeable by everyone. See README.md#user-permissions for more
# info.
command: |
sh -c "python manage.py initialize_database &&
gunicorn -b 0.0.0.0:5000 --reload --access-logfile - bevillingsplatform.wsgi"
volumes:
- .:/code/
- ./dev-environment/dev-settings.ini:/user-settings.ini
- ./log:/log
depends_on:
- db
- postfix
- idp
# If you want to reach the django image directly (as opposed through the
# `vue-cli-service serve` proxy), expose it with:
#ports:
# - 5000:5000
stdin_open: true
tty: true
bev-cron:
build:
context: .
dockerfile: docker/Dockerfile
target: dist
entrypoint: []
command: ["supercronic", "/code/docker/crontab"]
volumes:
- .:/code/
- ./dev-environment/dev-settings.ini:/user-settings.ini
- ./log:/log
depends_on:
- db
- postfix
- idp
db:
image: magentaaps/postgres-os2bos:1-10.14-test
env_file:
- dev-environment/db.env
volumes:
- postgres-data:/var/lib/postgresql/data
postfix:
image: catatnight/postfix
hostname: postfix
domainname: bevillingsplatform-test.magenta.dk
environment:
- maildomain=magenta.dk
- smtp_user=bev:bev
idp:
image: magentalabs/simplesamlphp:2.0.1
environment:
- SIMPLESAMLPHP_BASEURLPATH=http://localhost:8080/simplesaml/
- SIMPLESAMLPHP_SP_ENTITY_ID=http://localhost:8080
- SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE=http://localhost:8080/api/saml2_auth/acs/
volumes:
- ./dev-environment/authsources.php:/var/www/simplesamlphp/config/authsources.php
volumes:
postgres-data: