Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update all-in-one Docker container config to use 127.0.0.1 instead of localhost refernces (#1627)

Leendert de Borst3e470ea9d2b5
diff --git a/dockerfiles/all-in-one/Dockerfile b/dockerfiles/all-in-one/Dockerfile
index 8a173613c..abfcdebe8 100644
--- a/dockerfiles/all-in-one/Dockerfile
+++ b/dockerfiles/all-in-one/Dockerfile
@@ -226,5 +226,5 @@ ENV ALIASVAULT_VERBOSITY=0 \
EXPOSE 80 443 25 587
VOLUME ["/database", "/logs", "/secrets"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=90s --retries=3 \
- CMD curl -f http://localhost/api || exit 1
+ CMD curl -f http://127.0.0.1/api || exit 1
ENTRYPOINT ["/init"]
\ No newline at end of file
diff --git a/dockerfiles/all-in-one/config/nginx-443.conf b/dockerfiles/all-in-one/config/nginx-443.conf
index 91de62927..d7dfff076 100644
--- a/dockerfiles/all-in-one/config/nginx-443.conf
+++ b/dockerfiles/all-in-one/config/nginx-443.conf
@@ -8,15 +8,15 @@ http {
client_max_body_size 25M;
upstream client {
- server localhost:3000 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3000 max_fails=1 fail_timeout=5s;
}
upstream api {
- server localhost:3001 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3001 max_fails=1 fail_timeout=5s;
}
upstream admin {
- server localhost:3002 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3002 max_fails=1 fail_timeout=5s;
}
# Preserve any existing X-Forwarded-* headers, this is relevant if AliasVault
diff --git a/dockerfiles/all-in-one/config/nginx-80-443.conf b/dockerfiles/all-in-one/config/nginx-80-443.conf
index 1059c295b..ef5e37efd 100644
--- a/dockerfiles/all-in-one/config/nginx-80-443.conf
+++ b/dockerfiles/all-in-one/config/nginx-80-443.conf
@@ -9,15 +9,15 @@ http {
client_max_body_size 25M;
upstream client {
- server localhost:3000 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3000 max_fails=1 fail_timeout=5s;
}
upstream api {
- server localhost:3001 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3001 max_fails=1 fail_timeout=5s;
}
upstream admin {
- server localhost:3002 max_fails=1 fail_timeout=5s;
+ server 127.0.0.1:3002 max_fails=1 fail_timeout=5s;
}
# Preserve any existing X-Forwarded-* headers, this is relevant if AliasVault
diff --git a/dockerfiles/all-in-one/s6-scripts/admin/run b/dockerfiles/all-in-one/s6-scripts/admin/run
index 4e434c628..3ddb68840 100644
--- a/dockerfiles/all-in-one/s6-scripts/admin/run
+++ b/dockerfiles/all-in-one/s6-scripts/admin/run
@@ -14,7 +14,7 @@ if [ "$VERBOSITY" -ge 1 ]; then
fi
for i in {1..30}; do
- if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h localhost -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
+ if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h 127.0.0.1 -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
if [ "$VERBOSITY" -ge 1 ]; then
echo "[admin] PostgreSQL ready, starting Admin..."
fi
diff --git a/dockerfiles/all-in-one/s6-scripts/api/run b/dockerfiles/all-in-one/s6-scripts/api/run
index 7f9334297..891bf827c 100644
--- a/dockerfiles/all-in-one/s6-scripts/api/run
+++ b/dockerfiles/all-in-one/s6-scripts/api/run
@@ -14,7 +14,7 @@ if [ "$VERBOSITY" -ge 1 ]; then
fi
for i in {1..30}; do
- if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h localhost -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
+ if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h 127.0.0.1 -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
if [ "$VERBOSITY" -ge 1 ]; then
echo "[api] PostgreSQL ready, starting API..."
fi
diff --git a/dockerfiles/all-in-one/s6-scripts/client/run b/dockerfiles/all-in-one/s6-scripts/client/run
index 19f7b8dfa..a6f5b5e18 100644
--- a/dockerfiles/all-in-one/s6-scripts/client/run
+++ b/dockerfiles/all-in-one/s6-scripts/client/run
@@ -12,7 +12,7 @@ if [ "$VERBOSITY" -ge 1 ]; then
fi
for i in {1..30}; do
- if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h localhost -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
+ if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h 127.0.0.1 -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
if [ "$VERBOSITY" -ge 1 ]; then
echo "[client] PostgreSQL ready, starting client..."
fi
diff --git a/dockerfiles/all-in-one/s6-scripts/notification/run b/dockerfiles/all-in-one/s6-scripts/notification/run
index 372eb29ef..a00c793d7 100755
--- a/dockerfiles/all-in-one/s6-scripts/notification/run
+++ b/dockerfiles/all-in-one/s6-scripts/notification/run
@@ -8,7 +8,7 @@ if [ "$VERBOSITY" -le 1 ]; then
# Wait for all service ports to be responsive with timeout
READY=false
for i in $(seq 1 180); do # 3 minute timeout
- if nc -z localhost 3000 && nc -z localhost 3001 && nc -z localhost 3002 && nc -z localhost 80 && nc -z localhost 443; then
+ if nc -z 127.0.0.1 3000 && nc -z 127.0.0.1 3001 && nc -z 127.0.0.1 3002 && nc -z 127.0.0.1 80 && nc -z 127.0.0.1 443; then
READY=true
break
fi
diff --git a/dockerfiles/all-in-one/s6-scripts/smtp/run b/dockerfiles/all-in-one/s6-scripts/smtp/run
index a0234a4a2..183267ed5 100644
--- a/dockerfiles/all-in-one/s6-scripts/smtp/run
+++ b/dockerfiles/all-in-one/s6-scripts/smtp/run
@@ -14,7 +14,7 @@ if [ "$VERBOSITY" -ge 1 ]; then
fi
for i in {1..30}; do
- if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h localhost -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
+ if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h 127.0.0.1 -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
if [ "$VERBOSITY" -ge 1 ]; then
echo "[smtp] PostgreSQL ready, starting SMTP..."
fi
diff --git a/dockerfiles/all-in-one/s6-scripts/taskrunner/run b/dockerfiles/all-in-one/s6-scripts/taskrunner/run
index 56add8768..4209d9997 100644
--- a/dockerfiles/all-in-one/s6-scripts/taskrunner/run
+++ b/dockerfiles/all-in-one/s6-scripts/taskrunner/run
@@ -14,7 +14,7 @@ if [ "$VERBOSITY" -ge 1 ]; then
fi
for i in {1..30}; do
- if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h localhost -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
+ if PGPASSWORD="$POSTGRES_PASSWORD" /usr/lib/postgresql/16/bin/psql -h 127.0.0.1 -U aliasvault -d aliasvault -c "SELECT 1;" >/dev/null 2>&1; then
if [ "$VERBOSITY" -ge 1 ]; then
echo "[taskrunner] PostgreSQL ready, starting TaskRunner..."
fi