diff --git a/stacks/listmonk.yml b/stacks/listmonk.yml index 6f3a1f76..d068f9ac 100644 --- a/stacks/listmonk.yml +++ b/stacks/listmonk.yml @@ -9,10 +9,14 @@ services: - /bin/sh - -c - | - # ./listmonk --install --yes # Uncomment on first deploy + if [ "$$INSTALL" = "true" ]; then + ./listmonk --install --yes + fi rm config.toml ./listmonk --new-config - # ./listmonk --upgrade --yes # Uncomment to upgrade + if [ "$$UPGRADE" = "true" ]; then + ./listmonk --upgrade --yes + fi ./listmonk environment: - LISTMONK_app__admin_username=${ADMIN_USERNAME:-admin} @@ -24,6 +28,8 @@ services: - POSTGRES_USER=listmonk - POSTGRES_PASSWORD=myp@ssw0rd - DB_HOST=postgres + - INSTALL=${INSTALL:-false} + - UPGRADE=${UPGRADE:-false} deploy: labels: - traefik.enable=true