[Added] Docker compose, Gitea workflows, production to Dockerfile, Nginx conf
This commit is contained in:
+11
-12
@@ -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;"]
|
||||
|
||||
Reference in New Issue
Block a user