Update Dockerfile
This commit is contained in:
+6
-3
@@ -4,17 +4,20 @@ WORKDIR /app
|
|||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cp main.css src/static/styles/main.css || true
|
|
||||||
RUN cp client.css src/static/styles/client.css || true
|
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# Stage 2: Production (bleibt gleich)
|
# Stage 2: Production
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
WORKDIR /etc/nginx
|
WORKDIR /etc/nginx
|
||||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
COPY --from=build /app/build .
|
COPY --from=build /app/build .
|
||||||
|
|
||||||
|
# Expose port 80
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Healthcheck
|
||||||
HEALTHCHECK CMD curl --fail http://localhost:80 || exit 1
|
HEALTHCHECK CMD curl --fail http://localhost:80 || exit 1
|
||||||
|
|
||||||
|
# Start Nginx server
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
Reference in New Issue
Block a user