π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Tweak the nginx setup
Manav Rathi303b26b95ffa
diff --git a/server/cmd/museum/main.go b/server/cmd/museum/main.goindex 5ea4f33896..4905e82a4f 100644--- a/server/cmd/museum/main.go+++ b/server/cmd/museum/main.go@@ -712,7 +712,7 @@ func main() {}func runServer(environment string, server *gin.Engine) {- if environment == "local" {+ if environment == "local" || environment == "proxy" {server.Run(":8080")} else {certPath, err := config.CredentialFilePath("tls.cert")diff --git a/server/configurations/proxy.yaml b/server/configurations/proxy.yamlnew file mode 100644index 0000000000..0f206f09a2--- /dev/null+++ b/server/configurations/proxy.yaml@@ -0,0 +1,11 @@+# Production setup when running behind a reverse proxy like Nginx+#+# - TLS terminates on Nginx not on us+# - Otherwise the same as `production.yaml`++log-file: /var/logs/museum.log++stripe:+ path:+ success: ?status=success&session_id={CHECKOUT_SESSION_ID}+ cancel: ?status=fail&reason=canceleddiff --git a/server/scripts/deploy/README.md b/server/scripts/deploy/README.mdindex 7472a48671..5b55e6e78e 100644--- a/server/scripts/deploy/README.md+++ b/server/scripts/deploy/README.md@@ -1,8 +1,5 @@# Production Deployments-Museum runs using Docker + systemd on production instances, load balanced via-Cloudflare.-This document outlines how we ourselves deploy museum. Note that this is veryspecific to our use case, and while this might be useful as an example, this islikely overkill for simple self hosted deployments.diff --git a/server/scripts/deploy/museum.nginx.conf b/server/scripts/deploy/museum.nginx.confindex 9af7b41a0b..c36a352e6a 100644--- a/server/scripts/deploy/museum.nginx.conf+++ b/server/scripts/deploy/museum.nginx.conf@@ -7,7 +7,7 @@ server {server_name api.ente.io;location / {- proxy_pass http://host.docker.internal:9000;+ proxy_pass http://host.docker.internal:8080;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;diff --git a/server/scripts/deploy/museum.nginx.service b/server/scripts/deploy/museum.nginx.serviceindex 470add9349..6b32690f79 100644--- a/server/scripts/deploy/museum.nginx.service+++ b/server/scripts/deploy/museum.nginx.service@@ -9,9 +9,9 @@ ExecStartPre=docker pull rg.fr-par.scw.cloud/ente/museum-prodExecStartPre=-docker stop museumExecStartPre=-docker rm museumExecStart=docker run --name museum \- -e ENVIRONMENT=production \+ -e ENVIRONMENT=proxy \--hostname "%H" \- -p 443:443 \+ -p 8080:8080 \-p 2112:2112 \-v /root/museum/credentials:/credentials:ro \-v /root/museum/credentials.yaml:/credentials.yaml:ro \diff --git a/server/scripts/deploy/update-and-restart-museum.sh b/server/scripts/deploy/update-and-restart-museum.shindex e4e5b34da6..85f93ae05d 100755--- a/server/scripts/deploy/update-and-restart-museum.sh+++ b/server/scripts/deploy/update-and-restart-museum.sh@@ -3,7 +3,7 @@# This script is meant to be run on the production instances.## It will pull the latest Docker image, restart the museum process and start-# tailing the logs.+# tailing the logs as a sanity check.set -o errexit