Commit
·
c7401ed
1
Parent(s):
3b348aa
simplify dockerfile
Browse files- Dockerfile +0 -9
- docker-entrypoint-wrapper.sh +5 -8
Dockerfile
CHANGED
@@ -9,15 +9,6 @@ RUN apk update && apk add --no-cache \
|
|
9 |
net-tools \
|
10 |
iproute2
|
11 |
|
12 |
-
# Set up environment variables
|
13 |
-
ENV DATABASE_URL=postgresql://postgres:postgres@localhost:5432/node
|
14 |
-
ENV NEXTAUTH_SECRET=mysecret
|
15 |
-
ENV SALT=mysalt
|
16 |
-
ENV ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
17 |
-
ENV NODE_ENV=production
|
18 |
-
ENV HOSTNAME="0.0.0.0"
|
19 |
-
ENV PORT=3000
|
20 |
-
|
21 |
# Copy and set up the wrapper script
|
22 |
COPY docker-entrypoint-wrapper.sh /docker-entrypoint-wrapper.sh
|
23 |
RUN chmod +x /docker-entrypoint-wrapper.sh
|
|
|
9 |
net-tools \
|
10 |
iproute2
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
# Copy and set up the wrapper script
|
13 |
COPY docker-entrypoint-wrapper.sh /docker-entrypoint-wrapper.sh
|
14 |
RUN chmod +x /docker-entrypoint-wrapper.sh
|
docker-entrypoint-wrapper.sh
CHANGED
@@ -43,9 +43,6 @@ until pg_isready -h localhost; do
|
|
43 |
sleep 1
|
44 |
done
|
45 |
|
46 |
-
# Update DATABASE_URL to use TCP connection instead of Unix socket
|
47 |
-
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/node"
|
48 |
-
|
49 |
# Debug network information
|
50 |
echo "Network Debug Information:"
|
51 |
echo "-------------------------"
|
@@ -54,16 +51,16 @@ echo "-------------------------"
|
|
54 |
netstat -tulpn
|
55 |
echo "-------------------------"
|
56 |
|
57 |
-
# Set NEXTAUTH_URL based on
|
58 |
-
if [ -n "$
|
59 |
echo "Setting NEXTAUTH_URL to https://${SPACE_HOST}"
|
60 |
export NEXTAUTH_URL="https://${SPACE_HOST}"
|
61 |
else
|
62 |
-
echo "WARNING:
|
63 |
fi
|
64 |
|
65 |
-
#
|
66 |
-
export
|
67 |
|
68 |
# Run the original entrypoint script with explicit host binding
|
69 |
exec ./web/entrypoint.sh node ./web/server.js \
|
|
|
43 |
sleep 1
|
44 |
done
|
45 |
|
|
|
|
|
|
|
46 |
# Debug network information
|
47 |
echo "Network Debug Information:"
|
48 |
echo "-------------------------"
|
|
|
51 |
netstat -tulpn
|
52 |
echo "-------------------------"
|
53 |
|
54 |
+
# Set NEXTAUTH_URL based on SPACE_HOST if available
|
55 |
+
if [ -n "$SPACE_HOST" ]; then
|
56 |
echo "Setting NEXTAUTH_URL to https://${SPACE_HOST}"
|
57 |
export NEXTAUTH_URL="https://${SPACE_HOST}"
|
58 |
else
|
59 |
+
echo "WARNING: SPACE_HOST not found"
|
60 |
fi
|
61 |
|
62 |
+
# Update DATABASE_URL to use TCP connection
|
63 |
+
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/node"
|
64 |
|
65 |
# Run the original entrypoint script with explicit host binding
|
66 |
exec ./web/entrypoint.sh node ./web/server.js \
|