TelegramAktienBot/frontend/Dockerfile

30 lines
637 B
Docker
Raw Permalink Normal View History

FROM node:latest as build
2022-04-04 13:51:43 +00:00
# Change to the project directory
WORKDIR /usr/local/app
2022-04-04 13:51:43 +00:00
# Copy the project files to the container
COPY frontend /usr/local/app/
2022-04-04 13:51:43 +00:00
# Install dependencies
RUN npm install
RUN npm run build
FROM nginx:latest
2022-04-04 13:51:43 +00:00
# Copy the project files to the container
COPY --from=build /usr/local/app/dist/aktienbot /usr/share/nginx/html
2022-03-17 18:57:36 +00:00
2022-04-04 13:51:43 +00:00
# Copy configuration files
2022-03-17 18:33:38 +00:00
COPY frontend/deploy/nginx.conf /etc/nginx
2022-03-17 18:44:47 +00:00
COPY frontend/deploy deploy/
2022-04-04 13:51:43 +00:00
# Change file permissions
2022-03-17 18:57:36 +00:00
RUN chmod +x ./deploy/healthcheck.sh
2022-04-04 13:51:43 +00:00
# set healthcheck
HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]
2022-04-04 13:51:43 +00:00
# Expose webserver port
EXPOSE 80