[Added] Docker compose, Gitea workflows, production to Dockerfile, Nginx conf

This commit is contained in:
Ninjaws
2024-11-22 14:40:34 +01:00
parent 007c3dd588
commit 176ab06ca8
5 changed files with 60 additions and 12 deletions
+11 -12
View File
@@ -13,20 +13,19 @@ RUN apt-get update && \
# If root adds files, it takes ownership, making them unremovable on the host except by using sudo
# node tranfers ownership to the host user
USER node
# EXPOSE 4200
CMD ["tail","-f","/dev/null"]
#--- Building
# FROM base AS build
# COPY package*.json ./
# RUN npm install
# # Copied here, since the the Development setup uses a bind volume instead
# COPY . .
# RUN ng build --configuration production
FROM base AS build
COPY package*.json ./
RUN npm install
# Copied here, since the the Development setup uses a bind volume instead
COPY . .
RUN ng build --configuration production
#--- Production
# FROM nginx:alpine AS production
# COPY --from=build /app/dist/quiz/browser /usr/share/nginx/html
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# EXPOSE 80
# CMD ["nginx", "-g", "daemon off;"]
FROM nginx:alpine AS production
COPY --from=build /app/dist/portfolio/browser /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]