Build private multi-hotel web foundation with MongoDB, Gmail import and Linux deployment

This commit is contained in:
wolf-demon
2026-09-09 14:16:34 +01:00
parent dec97954c9
commit 49d02be623
37 changed files with 2598 additions and 2 deletions
+2
View File
@@ -0,0 +1,2 @@
const guestops = db.getSiblingDB('guestops');
guestops.createUser({user: 'guestops', pwd: process.env.MONGO_APP_PASSWORD, roles: [{role: 'readWrite', db: 'guestops'}]});
+31
View File
@@ -0,0 +1,31 @@
# Install within the existing Nginx configuration. Obtain the certificate first.
server {
listen 80;
server_name sandbox-guestops.futuresens.co.uk;
location /.well-known/acme-challenge/ { root /var/www/letsencrypt; }
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl;
server_name sandbox-guestops.futuresens.co.uk;
ssl_certificate /etc/letsencrypt/live/sandbox-guestops.futuresens.co.uk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sandbox-guestops.futuresens.co.uk/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 128k;
# OAuth authorization codes and state must not appear in access logs.
location = /api/integrations/google/callback {
access_log off;
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_read_timeout 60s;
}
}