mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
Upgrade Listmonk to v5.0.0 (#112)
* Update Listmonk to version 5.0.0 Also move environment variables to Dokploy's environment management. * Refactor Listmonk upgrade to v5.0.0 Move unused env variables back to compose file. Remove unnecessary setup container.
This commit is contained in:
parent
2a6bafb54b
commit
754c85368d
@ -3,42 +3,40 @@ services:
|
||||
image: postgres:17-alpine
|
||||
ports:
|
||||
- 5432
|
||||
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=listmonk
|
||||
- POSTGRES_USER=listmonk
|
||||
- POSTGRES_PASSWORD=listmonk
|
||||
- POSTGRES_DB=listmonk
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
||||
test: [ "CMD-SHELL", "pg_isready -U listmonk" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
volumes:
|
||||
- listmonk-data:/var/lib/postgresql/data
|
||||
|
||||
setup:
|
||||
image: listmonk/listmonk:v4.1.0
|
||||
|
||||
volumes:
|
||||
- ../files/config.toml:/listmonk/config.toml
|
||||
depends_on:
|
||||
- db
|
||||
command:
|
||||
[
|
||||
sh,
|
||||
-c,
|
||||
"sleep 3 && ./listmonk --install --idempotent --yes --config config.toml",
|
||||
]
|
||||
|
||||
app:
|
||||
restart: unless-stopped
|
||||
image: listmonk/listmonk:v4.1.0
|
||||
image: listmonk/listmonk:v5.0.0
|
||||
environment:
|
||||
- LISTMONK_app__address=0.0.0.0:9000
|
||||
- LISTMONK_db__user=listmonk
|
||||
- LISTMONK_db__password=listmonk
|
||||
- LISTMONK_db__database=listmonk
|
||||
- LISTMONK_db__host=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
|
||||
depends_on:
|
||||
- db
|
||||
- setup
|
||||
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.
|
||||
volumes:
|
||||
- ../files/config.toml:/listmonk/config.toml
|
||||
- listmonk-uploads:/listmonk/uploads
|
||||
|
@ -25,5 +25,5 @@ max_open = 25
|
||||
max_idle = 25
|
||||
max_lifetime = "300s"
|
||||
|
||||
params = ""
|
||||
params = ""
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user