-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (73 loc) · 2.03 KB
/
docker-compose.yml
File metadata and controls
80 lines (73 loc) · 2.03 KB
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
# SPDX-FileCopyrightText: 2024 Magenta ApS <info@magenta.dk>
#
# 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
- HOME=/tmp/
- ECHO_INTERFACE=http://localhost:8050
ports:
- "8050:8000"
networks:
- default
- database
- mail
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
- ./backupdata:/backupdata:rw
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-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: