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
|
ENV GATSBY_TELEMETRY_DISABLED 1
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM node:alpine AS runner
|
FROM nginx:alpine
|
||||||
WORKDIR /app
|
WORKDIR /usr/share/nginx/html
|
||||||
RUN addgroup -g 1001 -S gatsby
|
RUN rm -rf ./*
|
||||||
RUN adduser -S gatsby -u 1001
|
COPY --from=builder /app/public .
|
||||||
COPY --from=builder /app/public ./public
|
EXPOSE 80
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||||
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"]
|
|
@ -5,4 +5,4 @@ services:
|
|||||||
image: localhost:5000/infoscreen:latest
|
image: localhost:5000/infoscreen:latest
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
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