Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Tweaks

Manav Rathie170b6811db4
diff --git a/infra/services/listmonk/README.md b/infra/services/listmonk/README.md
index d357cc6726..e94c676cd4 100644
--- a/infra/services/listmonk/README.md
+++ b/infra/services/listmonk/README.md
@@ -35,7 +35,7 @@ sudo mv listmonk.nginx.conf /root/nginx/conf.d
> ```sh
> scp services/listmonk/initialize-db.sh <instance>:
>
-> sudo ./initialize-db.sh
+> sudo sh initialize-db.sh
> rm initialize-db.sh
> ```
diff --git a/infra/services/listmonk/initialize-db.sh b/infra/services/listmonk/initialize-db.sh
old mode 100644
new mode 100755
index 7c94a12cf7..576c607a92
--- a/infra/services/listmonk/initialize-db.sh
+++ b/infra/services/listmonk/initialize-db.sh
@@ -9,7 +9,6 @@ set -o xtrace
docker pull listmonk/listmonk
-docker run --rm --name listmonk \
- -p 9000:9000 \
+docker run -it --rm --name listmonk \
-v /root/listmonk/config.toml:/listmonk/config.toml:ro \
listmonk/listmonk ./listmonk --install
diff --git a/infra/services/listmonk/listmonk.nginx.conf b/infra/services/listmonk/listmonk.nginx.conf
index fd59a29800..783c28a8a6 100644
--- a/infra/services/listmonk/listmonk.nginx.conf
+++ b/infra/services/listmonk/listmonk.nginx.conf
@@ -18,7 +18,9 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
# Use HTTP/1.1 when talking to upstream
+ # Also, while not necessary (AFAIK), also allow websockets.
proxy_http_version 1.1;
- proxy_set_header Connection "";
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
}
}
diff --git a/infra/services/listmonk/listmonk.service b/infra/services/listmonk/listmonk.service
index 95a352bddf..46b1a5f416 100644
--- a/infra/services/listmonk/listmonk.service
+++ b/infra/services/listmonk/listmonk.service
@@ -10,6 +10,9 @@ WantedBy=multi-user.target
ExecStartPre=docker pull listmonk/listmonk
ExecStartPre=-docker stop listmonk
ExecStartPre=-docker rm listmonk
+ExecStartPre=-docker run --rm --name listmonk \
+ -v /root/listmonk/config.toml:/listmonk/config.toml:ro \
+ listmonk/listmonk --upgrade --yes
ExecStart=docker run --name listmonk \
-p 9000:9000 \
-v /root/listmonk/config.toml:/listmonk/config.toml:ro \