Simplify port mapping: expose 3500 externally, use 3000 internally
- Map host port 3500 to container port 3000 - Keep Next.js on default port 3000 inside container - Simplifies auth configuration
This commit is contained in:
@@ -46,9 +46,9 @@ COPY --from=builder /app/prisma ./prisma
|
|||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3500
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV PORT 3500
|
ENV PORT 3000
|
||||||
ENV HOSTNAME "0.0.0.0"
|
ENV HOSTNAME "0.0.0.0"
|
||||||
|
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "3500:3500"
|
- "3500:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- DATABASE_URL=${DATABASE_URL}
|
- DATABASE_URL=${DATABASE_URL}
|
||||||
- AUTH_URL=${AUTH_URL:-http://localhost:3500}
|
- AUTH_URL=http://localhost:3500
|
||||||
- NEXTAUTH_URL=${NEXTAUTH_URL:-http://localhost:3500}
|
- NEXTAUTH_URL=http://localhost:3500
|
||||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||||
- AUTH_SECRET=${AUTH_SECRET}
|
- AUTH_SECRET=${AUTH_SECRET}
|
||||||
- AUTH_TRUST_HOST=true
|
- AUTH_TRUST_HOST=true
|
||||||
|
|||||||
Reference in New Issue
Block a user