diff --git a/Dockerfile b/Dockerfile index 30d87afc..f924c2a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,7 +56,8 @@ USER nextjs EXPOSE 8080 ENV PORT=8080 +ENV HOSTNAME=0.0.0.0 ENV DOMAIN="https://writing.natwelch.com" ENV GRAPHQL_ORIGIN="https://graphql.natwelch.com/graphql" -CMD ["node", "server.js", "-H", "0.0.0.0", "-p", "$PORT"] +CMD ["node", "server.js"] diff --git a/next.config.js b/next.config.js index 8416b3e9..c00f30bb 100644 --- a/next.config.js +++ b/next.config.js @@ -5,7 +5,8 @@ const { createSecureHeaders } = require("next-secure-headers") const { withContentlayer } = require("next-contentlayer") const port = process.env.PORT || "8080" -const domain = process.env.DOMAIN || `http://localhost:${port}` +const hostname = process.env.HOSTNAME || `localhost` +const domain = process.env.DOMAIN || `http://${hostname}:${port}` /** @type {import('next').NextConfig} */ const nextConfig = {