Skip to content

Commit

Permalink
Fix container issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWahlin committed Nov 17, 2024
1 parent d8bd2de commit 19b0f97
Show file tree
Hide file tree
Showing 4 changed files with 618 additions and 411 deletions.
4 changes: 2 additions & 2 deletions .docker/nginx.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ ENV NG_APP_API_URL=$NG_APP_API_URL

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install --no-optional
RUN npm install
COPY . .
RUN npm run build

##### Stage 2
FROM nginx:alpine
VOLUME /var/cache/nginx
COPY --from=node /app/dist /usr/share/nginx/html
COPY --from=node /app/dist/angular-jumpstart /usr/share/nginx/html
COPY ./.docker/config/nginx.conf /etc/nginx/conf.d/default.conf

# Run from project root
Expand Down
5 changes: 2 additions & 3 deletions .docker/node.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ ENV CONTAINER=true
WORKDIR /var/www/node-service

COPY package.json package-lock.json ./
RUN npm install --only=prod --no-optional
RUN npm install --omit=dev --omit=optional

COPY ./server.js .
COPY ./api .
COPY ./public/data .
COPY ./public ./public

EXPOSE 8080

Expand Down
Loading

0 comments on commit 19b0f97

Please sign in to comment.