This commit is contained in:
Franz Heinzmann (Frando) 2022-09-29 14:36:44 +02:00
parent bab02f1d8a
commit 397c549312
3 changed files with 11 additions and 9 deletions

View File

@ -1,23 +1,25 @@
--- ---
version: "3.7" version: "3.8"
services: services:
app: app:
restart: unless-stopped
image: listmonk/listmonk:latest image: listmonk/listmonk:latest
networks: networks:
- internal - internal
- proxy - proxy
environment: environment:
- TZ=Etc/UTC - TZ=Etc/UTC
- LISTMONK_DB_HOST=db - LISTMONK_DB_HOST=${STACK_NAME}_db
secrets:
- db_password
- admin_password
depends_on: depends_on:
- db - db
configs: configs:
- source: config_toml - source: config_toml
target: /listmonk/config.toml target: /listmonk/config.toml
- source: app_entrypoint - source: app_entrypoint
target: /docker_entrypoint.sh target: /docker-entrypoint.sh
mode: 0555 mode: 0555
entrypoint: /docker-entrypoint.sh entrypoint: /docker-entrypoint.sh
deploy: deploy:
@ -41,7 +43,6 @@ services:
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password - POSTGRES_PASSWORD_FILE=/run/secrets/db_password
- POSTGRES_USER=listmonk - POSTGRES_USER=listmonk
- POSTGRES_DB=listmonk - POSTGRES_DB=listmonk
restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U listmonk"] test: ["CMD-SHELL", "pg_isready -U listmonk"]
interval: 10s interval: 10s
@ -62,11 +63,10 @@ configs:
config_toml: config_toml:
name: ${STACK_NAME}_config_toml_${CONFIG_TOML_VERSION} name: ${STACK_NAME}_config_toml_${CONFIG_TOML_VERSION}
file: config.toml.tmpl file: config.toml.tmpl
# template_driver: golang template_driver: golang
app_entrypoint: app_entrypoint:
name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION} name: ${STACK_NAME}_app_entrypoint_${APP_ENTRYPOINT_VERSION}
file: docker-entrypoint.sh file: docker-entrypoint.sh
# template_driver: golang
networks: networks:
internal: internal:

View File

@ -5,7 +5,7 @@ admin_password = "{{ secret "admin_password" }}"
# Database. # Database.
[db] [db]
host = "{{ env "LISTMONK_DB_HOST" }} " host = "{{ env "LISTMONK_DB_HOST" }}"
port = 5432 port = 5432
user = "listmonk" user = "listmonk"
password = "{{ secret "db_password" }}" password = "{{ secret "db_password" }}"

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
set -e
cd /listmonk cd /listmonk
./listmonk --install || ./listmonk --upgrade ./listmonk --install --yes --idempotent
./listmonk --upgrade --yes
./listmonk ./listmonk