vega-frontend-monorepo/dockerfiles/Dockerfile.cra.dist
fryd ea7e175fde
ci: fix publishing docker images (#1104)
* ci: improve GitHub Action to build and publish docker image

* ci: increase the timeout for yarn steps

* ci: fix build-args

* ci: merge build GitHub Workflows into one

* ci: add more logging

* ci: Pack locally built dist into nginx container

* ci: build actual app

* ci: setup correct node version

* ci: include dist in context

* ci: use correct path to determine node version

* ci: push images

* ci: publish image

* ci: login always to the hub

* ci: remove debugging conditions

Co-authored-by: Mikołaj Młodzikowski <mikolaj.mlodzikowski@gmail.com>
2022-08-30 09:53:27 +01:00

18 lines
359 B
Docker

FROM nginx:stable-alpine
ARG APP
COPY dist/apps/$APP /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
WORKDIR /usr/share/nginx/html
COPY ./env.sh .
COPY ./apps/$APP/.env .env
# Add bash
RUN apk add --no-cache bash
RUN chmod +x ./env.sh
CMD ["/bin/sh", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]