-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdev.docker-compose.yml
More file actions
168 lines (156 loc) · 5.32 KB
/
dev.docker-compose.yml
File metadata and controls
168 lines (156 loc) · 5.32 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
x-db-credentials:
&db-credentials # Use the default POSTGRES_ credentials if they're available or simply default to "listmonk"
POSTGRES_USER: &db-user listmonk # for database user, password, and database name
POSTGRES_PASSWORD: &db-password listmonk
POSTGRES_DB: &db-name listmonk
services:
postgres:
image: postgres:17
container_name: postgres-dev-delegator
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d postgres -U postgres']
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
volumes:
- delegator-dev:/var/lib/postgresql/data
# When using the mock server this can be helpful to paste into the form to create a valid token with claims etc.
# {
# "email": "my@mail.com",
# "family_name": "Munify",
# "given_name": "Delegator Jr.",
# "preferred_username": "delegatoruser_123",
# "locale": "de",
# "roles": ["admin"]
# }
mockoidc:
image: ghcr.io/navikt/mock-oauth2-server:2.1.10
ports:
- 8080:8080
environment:
JSON_CONFIG: >
{
"interactiveLogin": true,
"httpServer": "NettyWrapper",
"tokenCallbacks": [
{
"issuerId": "issuer1",
"tokenExpiry": 120,
"requestMappings": [
{
"requestParam": "code",
"match": "code1",
"claims": {
"sub": "subByCode",
"aud": [
"audByCode"
]
}
}
]
}
],
"loginPagePath": "/static/mock-oidc-landingpage.html"
}
volumes:
- ./mock-oidc-landingpage.html:/static/mock-oidc-landingpage.html
# app:
# image: munifydelegator
# depends_on:
# - postgres
# network_mode: host
# environment:
# - PORT=3000
# - DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
# - PUBLIC_OIDC_AUTHORITY=http://localhost:8080
# # - PUBLIC_OIDC_AUTHORITY=https://guard.munify.cloud
# - PUBLIC_OIDC_CLIENT_ID=delegator
# # - PUBLIC_OIDC_CLIENT_ID=275671515582758948@dev
# - SECRET=123
listmonk_app:
image: listmonk/listmonk:latest
container_name: listmonk_app
restart: unless-stopped
ports:
- '9000:9000' # To change the externally exposed port, change to: $custom_port:9000
hostname: localhost:9000 # Recommend using FQDN for hostname
depends_on:
- listmonk_db
command:
[
sh,
-c,
"./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"
]
# --config (file) param is set to empty so that listmonk only uses the env vars (below) for config.
# --install --idempotent ensures that DB installation happens only once on an empty DB, on the first ever start.
# --upgrade automatically runs any DB migrations when a new image is pulled.
environment: # The same params as in config.toml are passed as env vars here.
LISTMONK_app__address: 0.0.0.0:9000
LISTMONK_db__user: *db-user
LISTMONK_db__password: *db-password
LISTMONK_db__database: *db-name
LISTMONK_db__host: listmonk_db
LISTMONK_db__port: 5432
LISTMONK_db__ssl_mode: disable
LISTMONK_db__max_open: 25
LISTMONK_db__max_idle: 25
LISTMONK_db__max_lifetime: 300s
TZ: Etc/UTC
LISTMONK_ADMIN_USER: ${LISTMONK_ADMIN_USER:-} # If these (optional) are set during the first `docker compose up`, then the Super Admin user is automatically created.
LISTMONK_ADMIN_PASSWORD: ${LISTMONK_ADMIN_PASSWORD:-} # Otherwise, the user can be setup on the web app after the first visit to http://localhost:9000
# Listmonk Postgres database
listmonk_db:
image: postgres:17-alpine
container_name: listmonk_db
restart: unless-stopped
ports:
- '5433:5432' # Only bind on the local interface. To connect to Postgres externally, change this to 0.0.0.0
environment:
<<: *db-credentials
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U listmonk']
interval: 10s
timeout: 5s
retries: 6
volumes:
- type: volume
source: listmonk-data
target: /var/lib/postgresql/data
# Mailpit - SMTP mock server for local email testing
# Web UI: http://localhost:8025
# SMTP: localhost:1025
mailpit:
image: axllent/mailpit:latest
container_name: mailpit-dev-delegator
ports:
- '1025:1025' # SMTP server
- '8025:8025' # Web UI
environment:
MP_SMTP_AUTH: 'mailpit:mailpit'
MP_SMTP_AUTH_ALLOW_INSECURE: 1
# Bugsink - Self-hosted error tracking (Sentry-compatible)
# Web UI: http://localhost:8000
bugsink:
image: bugsink/bugsink:latest
container_name: bugsink-dev-delegator
restart: unless-stopped
ports:
- '8000:8000'
environment:
SECRET_KEY: 'k8Qz7mP3xL9wR2vN5tY1cF6hJ4aS0dG8bU3iE7oA2nM9pW5qX1zC4vB6y'
CREATE_SUPERUSER: 'admin@delegator.local:admin123'
BEHIND_HTTPS_PROXY: 'false'
BASE_URL: 'http://localhost:8000'
volumes:
- bugsink-data:/app/data
volumes:
delegator-dev:
listmonk-data:
bugsink-data: