Newer
Older
# Stage 0, based on Node.js, to build and compile Angular
WORKDIR /app
FORESTIER Fabien
committed
# Copy the package.json file first in order to cache the modules
COPY ./package.json .
FORESTIER Fabien
committed
COPY ./patch.js .
# Launch postinstall script (to include crypto module)
RUN npm run postinstall
FORESTIER Fabien
committed
# Copy the project
COPY ./angular.json .
COPY ./tsconfig.json .
COPY ./src ./src
FORESTIER Fabien
committed
# Building the Angular app /dist i18n
# Stage 1, based on Nginx, to have only the compiled app
## Install dependency to get lua module in .conf
ncastejon
committed
RUN apt-get --assume-yes install nginx-extras
FORESTIER Fabien
committed
RUN rm /etc/nginx/conf.d/*
COPY --from=builder /app/dist/fr /usr/share/nginx/html
COPY --from=builder /app/dist/en /usr/share/nginx/html/en
RUN ls -l /usr/share/nginx/html