-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rewrite] Docker build and run (nginx) logic
- Upgrade to latest images - Use an S2I-ish build, as per [the nginx image's documentation](https://catalog.redhat.com/software/containers/ubi8/nginx-122/627245493b950f9f4eb01218?architecture=amd64&image=65cba48e6e4e02d0baaab056) - Remove the responsibility of setting `nginx.conf` from the Helm chart, and put the file directly as a static file (i.e. no more `ConfigMap/nginx-conf`)
- Loading branch information
Dominique Quatravaux
committed
Mar 27, 2024
1 parent
5c82fb2
commit 3bc4514
Showing
6 changed files
with
24 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
FROM registry.access.redhat.com/ubi8/nodejs-16:latest AS build | ||
FROM registry.access.redhat.com/ubi8/nodejs-20:latest AS build | ||
USER root | ||
RUN command -v yarn || npm i -g yarn | ||
RUN npm i -g yarn | ||
|
||
ADD . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN yarn install && yarn build | ||
|
||
FROM registry.access.redhat.com/ubi8/nginx-120:latest | ||
FROM registry.access.redhat.com/ubi8/nginx-122:latest | ||
|
||
COPY --from=build /usr/src/app/dist /usr/share/nginx/html | ||
COPY docker/entrypoint.sh / | ||
COPY --from=build /usr/src/app/dist /tmp/src | ||
COPY docker/nginx.conf . | ||
|
||
USER 1001 | ||
RUN /usr/libexec/s2i/assemble | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD /usr/libexec/s2i/run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
error_log /dev/stdout info; | ||
events {} | ||
http { | ||
access_log /dev/stdout; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
keepalive_timeout 65; | ||
server { | ||
listen 8443 ssl; | ||
listen [::]:8443 ssl; | ||
ssl_certificate /var/cert/tls.crt; | ||
ssl_certificate_key /var/cert/tls.key; | ||
root /opt/app-root/src; | ||
} | ||
} |