Use nginx
This commit is contained in:
parent
2ae43c6e22
commit
d13bc2d312
18
Dockerfile
18
Dockerfile
@ -7,15 +7,9 @@ COPY . .
|
||||
ENV GATSBY_TELEMETRY_DISABLED 1
|
||||
RUN npm run build
|
||||
|
||||
FROM node:alpine AS runner
|
||||
WORKDIR /app
|
||||
RUN addgroup -g 1001 -S gatsby
|
||||
RUN adduser -S gatsby -u 1001
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
USER gatsby
|
||||
EXPOSE 9000
|
||||
ENV PORT 9000
|
||||
ENV GATSBY_TELEMETRY_DISABLED 1
|
||||
CMD ["node_modules/.bin/gatsby", "serve"]
|
||||
FROM nginx:alpine
|
||||
WORKDIR /usr/share/nginx/html
|
||||
RUN rm -rf ./*
|
||||
COPY --from=builder /app/public .
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
@ -5,4 +5,4 @@ services:
|
||||
image: localhost:5000/infoscreen:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 11460:9000 # 1, 14th char in alphabet, 6th char in alphabet, 0
|
||||
- 11460:80 # 1, 14th char in alphabet, 6th char in alphabet, 0
|
Loading…
Reference in New Issue
Block a user