Skip to content

Commit

Permalink
update docker for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmostafa committed Nov 25, 2024
1 parent abadadd commit 60e4d54
Show file tree
Hide file tree
Showing 3 changed files with 764 additions and 1,222 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ services:
dockerfile: Dockerfile
image: ghcr.io/idaholab/resdeeds/web
container_name: resdeeds-web
depends_on:
- api
ports:
- 80:80
- 443:443
- 4200:4200
stdin_open: true
tty: true
Expand Down
17 changes: 11 additions & 6 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM node:20-alpine
FROM node:22 AS build

WORKDIR /var/www

COPY . /var/www/

# Configure INL certs and environment variables
RUN apk update && apk add ca-certificates
ADD http://certstore.inl.gov/pki/CAINLROOT_B64.crt /usr/local/share/ca-certificates/
RUN /usr/sbin/update-ca-certificates
ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt \
Expand All @@ -14,10 +13,16 @@ ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt \
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
SSL_CERT_DIR=/etc/ssl/certs/

RUN npm install -g @angular/cli
RUN apt-get update
RUN npm i -g @angular/cli \
&& npm i

RUN npm install
RUN ng build --configuration=production

EXPOSE 4200
FROM nginx:alpine

CMD ["ng", "serve", "--host", "0.0.0.0"]
COPY --from=build /var/www/dist/resdeeds /usr/share/nginx/html

EXPOSE 80 443 4200

CMD ["nginx", "-g", "daemon off;"]
Loading

0 comments on commit 60e4d54

Please sign in to comment.