Skip to content

Commit

Permalink
hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
icco committed Aug 19, 2023
1 parent cb97195 commit 0a4dabb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 0a4dabb

Please sign in to comment.