-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
104 lines (95 loc) · 3.26 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
# SPDX-FileCopyrightText: 2024 Magenta ApS <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
services:
havneafgifter-web:
user: "75170:1000" # Override in docker-compose.override.yml if your local user is different
container_name: havneafgifter-web
image: havneafgifter:latest
build:
context: .
dockerfile: docker/Dockerfile
env_file:
- ./dev-environment/havneafgifter.env
depends_on:
- havneafgifter-db
volumes:
- ./havneafgifter/:/app:rw
- ./mypy.ini:/mypy.ini:ro
- file-data:/upload # rw for at kunne teste; bør være ro i deployments
- ./log/havneafgifter.log:/log/havneafgifter.log:rw
- ./dev-environment/cert:/ssl:ro
- pdf-data:/storage/pdf:rw
- ./dev-environment/cache/:/static/CACHE/:rw
environment:
- MAKE_MIGRATIONS=true
- MIGRATE=true
- LOAD_FIXTURES=true
- LOAD_DEMODATA=true
- TEST=true
- HOME=/tmp/
ports:
- "8050:8000"
networks:
- default
- database
- mail
restart: unless-stopped
command: gunicorn -b 0.0.0.0:8000 project.wsgi:application --reload -w 1 --access-logfile - --error-logfile - --capture-output # reload on code changes
havneafgifter-db:
# Do not set `user` here
container_name: havneafgifter-db
image: postgres:16
env_file:
- ./dev-environment/havneafgifter.env
volumes:
- postgres-data:/var/lib/postgresql/data
restart: always
networks:
- database
havneafgifter-mailhog:
container_name: havneafgifter-mailhog
image: mailhog/mailhog
logging:
driver: 'none' # Disable saving logs
ports:
- "8052:8025"
networks:
- mail
havneafgifter-idp:
user: "1000:1000" # Override in docker-compose.override.yml if your local user is different
image: kenchan0130/simplesamlphp
container_name: havneafgifter-idp
environment:
HTTP_PORT: 8051
SIMPLESAMLPHP_SP_ENTITY_ID: http://havneafgifter-web:8050/saml/saml/metadata/
SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://havneafgifter-web:8050/saml/login/callback/
SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE: http://havneafgifter-web:8050/saml/logout/callback/
SIMPLESAMLPHP_IDP_CERTIFICATE: /var/www/simplesamlphp/cert/selfsigned.crt
SIMPLESAMLPHP_IDP_PRIVATEKEY: /var/www/simplesamlphp/cert/selfsigned.key
volumes:
- ./dev-environment/cert/idp/selfsigned.crt:/var/www/simplesamlphp/cert/server.crt:ro
- ./dev-environment/cert/idp/selfsigned.key:/var/www/simplesamlphp/cert/server.pem:ro
- ./dev-environment/idp/authsources.php:/var/www/simplesamlphp/config/authsources.php:ro
- ./dev-environment/idp/saml20-sp-remote.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php:ro
- ./dev-environment/idp/ports.conf:/etc/apache2/ports.conf:ro
- ./dev-environment/idp/site.conf:/etc/apache2/sites-available/simplesamlphp.conf:ro
ports:
- "8051:8051"
networks:
- default
havneafgifter-hosts-updater:
container_name: havneafgifter-hosts-updater
image: bash
volumes:
- ./dev-environment/hosts.sh:/hosts.sh:ro
- /etc/hosts:/hosts:rw
command: [ "bash", "/hosts.sh" ]
volumes:
postgres-data:
file-data:
pdf-data:
networks:
default:
database:
mail: