Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update all-in-one image to run in HTTP 80 mode (#1181)
Leendert de Borst21e0ad501763
diff --git a/dockerfiles/all-in-one/Dockerfile b/dockerfiles/all-in-one/Dockerfileindex fd5b28cca..473f394b2 100644--- a/dockerfiles/all-in-one/Dockerfile+++ b/dockerfiles/all-in-one/Dockerfile@@ -109,11 +109,8 @@ RUN apt-get update && \/app/taskrunner \/app/installcli \/database \- /certificates/ssl \/logs/postgres \- /etc/nginx/ssl \/var/run/postgresql \- /var/www/certbot \/etc/s6-overlay/s6-rc.d/user/contents.d# Copy built applications and all configuration files from builder stage@@ -122,7 +119,7 @@ COPY --from=dotnet-builder /app /app# Copy configuration files and scripts directly to their destinationsCOPY dockerfiles/all-in-one/reset-admin-password.sh /usr/local/bin/reset-admin-password.shCOPY apps/server/AliasVault.Client/nginx.conf /app/client/nginx.conf-COPY apps/server/nginx.conf /etc/nginx/nginx.conf+COPY dockerfiles/all-in-one/config/nginx.conf /etc/nginx/nginx.confCOPY apps/server/status.html /usr/share/nginx/html/status.htmlCOPY dockerfiles/all-in-one/s6-scripts /etc/s6-overlay/s6-rc.d/@@ -131,9 +128,6 @@ RUN cp -r /app/installcli /usr/local/bin/aliasvault-cli && \chmod +x /usr/local/bin/aliasvault-cli/AliasVault.InstallCli \/usr/local/bin/reset-admin-password.sh && \ln -s /usr/local/bin/aliasvault-cli/AliasVault.InstallCli /usr/local/bin/aliasvault-cli.sh && \- sed -i 's/server client:3000/server localhost:3000/g; \- s/server api:3001/server localhost:3001/g; \- s/server admin:3002/server localhost:3002/g' /etc/nginx/nginx.conf && \find /etc/s6-overlay/s6-rc.d -type f \( -name "run" -o -name "up" -o -name "script" \) -exec chmod +x {} \; && \cd /etc/s6-overlay/s6-rc.d/user/contents.d && \touch init postgres api client admin smtp taskrunner nginx notification && \@@ -153,8 +147,8 @@ ENV ALIASVAULT_VERBOSITY=0 \S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \S6_VERBOSITY=0-EXPOSE 80 443 25 587-VOLUME ["/database", "/certificates", "/logs", "/secrets"]+EXPOSE 80 25 587+VOLUME ["/database", "/logs", "/secrets"]HEALTHCHECK --interval=30s --timeout=10s --start-period=90s --retries=3 \- CMD curl -f -k https://localhost/api || exit 1+ CMD curl -f http://localhost/api || exit 1ENTRYPOINT ["/init"]\ No newline at end of filediff --git a/dockerfiles/all-in-one/README.md b/dockerfiles/all-in-one/README.mdindex a22b570d0..778bf858e 100644--- a/dockerfiles/all-in-one/README.md+++ b/dockerfiles/all-in-one/README.md@@ -18,9 +18,7 @@ docker build -f dockerfiles/all-in-one/Dockerfile -t aliasvault-allinone:local .docker run -d \--name aliasvault \-p 80:80 \- -p 443:443 \-v ./database:/database \- -v ./certificates:/certificates \-v ./logs:/logs \-v ./secrets:/secrets \aliasvault-allinone:localdiff --git a/dockerfiles/all-in-one/config/nginx.conf b/dockerfiles/all-in-one/config/nginx.confnew file mode 100644index 000000000..e469e51b3--- /dev/null+++ b/dockerfiles/all-in-one/config/nginx.conf@@ -0,0 +1,112 @@+# This is the main Nginx configuration file for the AliasVault all-in-one container.+# which exposes all AliasVault services via a single port 80.+events {+ worker_connections 1024;+}++http {+ client_max_body_size 25M;++ upstream client {+ server localhost:3000 max_fails=1 fail_timeout=5s;+ }++ upstream api {+ server localhost:3001 max_fails=1 fail_timeout=5s;+ }++ upstream admin {+ server localhost:3002 max_fails=1 fail_timeout=5s;+ }++ # Preserve any existing X-Forwarded-* headers, this is relevant if AliasVault+ # is running behind another reverse proxy.+ set_real_ip_from 10.0.0.0/8;+ set_real_ip_from 172.16.0.0/12;+ set_real_ip_from 192.168.0.0/16;+ real_ip_header X-Forwarded-For;+ real_ip_recursive on;++ include /etc/nginx/mime.types;+ default_type application/octet-stream;++ # Enable gzip compression, which reduces the amount of data that needs to be transferred+ # to speed up WASM load times.+ gzip on;+ gzip_vary on;+ gzip_proxied any;+ gzip_comp_level 6;+ gzip_buffers 16 8k;+ gzip_http_version 1.1;+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;++ server {+ listen 80;+ server_name _;++ # Security headers+ add_header Referrer-Policy "strict-origin-when-cross-origin" always;+ add_header X-Content-Type-Options "nosniff" always;+ add_header X-Frame-Options "SAMEORIGIN" always;+ add_header Cross-Origin-Resource-Policy "same-origin" always;+ add_header Content-Security-Policy "frame-ancestors 'self'" always;++ # Root for static files+ root /usr/share/nginx/html;++ # Error page handler location (internal use only)+ location = /status.html {+ internal;+ try_files /status.html =404;+ add_header Cache-Control "no-cache, no-store, must-revalidate";+ add_header Pragma "no-cache";+ add_header Expires "0";+ }++ # Admin interface+ location /admin {+ proxy_pass http://admin;+ proxy_set_header Host $http_host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-Proto $scheme;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Prefix /admin/;++ # Add WebSocket support for Blazor server+ proxy_http_version 1.1;+ proxy_set_header Upgrade $http_upgrade;+ proxy_set_header Connection "upgrade";+ proxy_read_timeout 86400;++ # Show status page if admin is down+ proxy_intercept_errors on;+ error_page 502 503 504 =503 /status.html;+ }++ # API endpoints+ location /api {+ proxy_pass http://api;+ proxy_set_header Host $http_host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-Proto $scheme;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;++ # Show status page if api is down+ proxy_intercept_errors on;+ error_page 502 503 504 =503 /status.html;+ }++ # Client app (root path)+ location / {+ proxy_pass http://client;+ proxy_set_header Host $http_host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Forwarded-Proto $scheme;+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;++ # Show status page if client is down+ proxy_intercept_errors on;+ error_page 502 503 504 =503 /status.html;+ }+ }+}\ No newline at end of filediff --git a/dockerfiles/all-in-one/s6-scripts/init/script b/dockerfiles/all-in-one/s6-scripts/init/scriptindex f4204bfac..3160295c1 100644--- a/dockerfiles/all-in-one/s6-scripts/init/script+++ b/dockerfiles/all-in-one/s6-scripts/init/script@@ -154,37 +154,6 @@ elsechmod 700 /database/postgresfi-# Future: Database migrations could go here-# log 1 "[init] Checking for database migrations..."-# if [ -f /app/migrations/pending ]; then-# log 1 "[init] → Running database migrations..."-# # Run migration logic here-# fi--# Generate SSL certificates if needed-if [ ! -f /certificates/ssl/cert.pem ] || [ ! -f /certificates/ssl/key.pem ]; then- log 0 ""- log 0 "[init] Generating SSL certificates..."- mkdir -p /certificates/ssl- if [ "$VERBOSITY" -ge 2 ]; then- openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \- -keyout /certificates/ssl/key.pem \- -out /certificates/ssl/cert.pem \- -subj "/C=US/ST=State/L=City/O=AliasVault/CN=${HOSTNAME:-localhost}"- else- openssl req -x509 -nodes -days 3650 -newkey rsa:2048 \- -keyout /certificates/ssl/key.pem \- -out /certificates/ssl/cert.pem \- -subj "/C=US/ST=State/L=City/O=AliasVault/CN=${HOSTNAME:-localhost}" \- >/dev/null 2>&1- fi- chmod 600 /certificates/ssl/key.pem- chmod 644 /certificates/ssl/cert.pem- log 0 "[init] Self-signed SSL certificates generated"-else- log 0 "[init] ✅ Self-signed SSL certificates already exist"-fi-echo ""echo "[init] Waiting for all services to be ready... this can take a short while..."echo ""diff --git a/dockerfiles/all-in-one/s6-scripts/nginx/run b/dockerfiles/all-in-one/s6-scripts/nginx/runindex 761d645d2..5198bb4f7 100644--- a/dockerfiles/all-in-one/s6-scripts/nginx/run+++ b/dockerfiles/all-in-one/s6-scripts/nginx/run@@ -3,23 +3,7 @@# Get verbosity level (0=minimal, 1=normal, 2=verbose)VERBOSITY="${ALIASVAULT_VERBOSITY:-0}"-# Copy certificates to nginx directory (they were created during init)-mkdir -p /etc/nginx/ssl-cp /certificates/ssl/* /etc/nginx/ssl/ 2>/dev/null || true--# Create SSL configuration file-cat > /etc/nginx/ssl.conf << "SSLEOF"-ssl_certificate /etc/nginx/ssl/cert.pem;-ssl_certificate_key /etc/nginx/ssl/key.pem;-ssl_session_timeout 1d;-ssl_session_cache shared:MozTLS:10m;-ssl_session_tickets off;-ssl_protocols TLSv1.2 TLSv1.3;-ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384;-ssl_prefer_server_ciphers off;-SSLEOF--echo "Starting Nginx reverse proxy..."+echo "Starting Nginx reverse proxy (HTTP-only mode)..."# Set nginx error log level based on verbosityif [ "$VERBOSITY" -ge 2 ]; thendiff --git a/dockerfiles/docker-compose.all-in-one.yml b/dockerfiles/docker-compose.all-in-one.ymlindex 4d5405d6a..dacda95c9 100644--- a/dockerfiles/docker-compose.all-in-one.yml+++ b/dockerfiles/docker-compose.all-in-one.yml@@ -6,13 +6,11 @@ services:ports:- "80:80"- - "443:443"- "25:25"- "587:587"volumes:- ./database:/database- - ./certificates:/certificates- ./logs:/logs- ./secrets:/secrets