platform/apps/ui/Dockerfile
Chris Anderson 732d8d1f12
Adds Docker Jobs (#63)
* Start creating action release flow

* Updates build workflow

* Removes one step

* Another try

* Tweaks to build paths

* Fixes docker ignore

* Tweaks to database migration

* Removes useless entrypoint

* Fixes to database files

* More tweaks to build

* Tweaks to base URL

* Allows for config file to override env

* Tweak to order

* Next try

* Fixes comma error

* Another try

* Adds a health endpoint

* Try Nginx proxy pass

* Re-adds environment path

* Remove auto build on branch

* Linter fixes
2023-03-04 21:11:59 -06:00

18 lines
No EOL
659 B
Docker

# --------------> The compiler image
FROM node:16 AS compile
WORKDIR /usr/src/app/apps/ui
COPY ./tsconfig.base.json /usr/src/app
COPY ./apps/ui ./
RUN npm ci
RUN npm run build
# --------------> The production image
FROM nginx:1.23.1-alpine
EXPOSE 3000
COPY --from=compile /usr/src/app/apps/ui/docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=compile /usr/src/app/apps/ui/build /usr/share/nginx/html
COPY --from=compile /usr/src/app/apps/ui/scripts /usr/share/nginx/html
WORKDIR /usr/share/nginx/html
RUN apk add --no-cache bash
RUN chmod +x env.sh
CMD ["/bin/bash", "-c", "/usr/share/nginx/html/env.sh && nginx -g \"daemon off;\""]