replaced node:lts-alpine by node:lts-bullseye

This commit is contained in:
2022-09-05 14:54:21 +02:00
parent 873ef81d46
commit 328d9943fc
6 changed files with 37 additions and 24 deletions
+28 -19
View File
@@ -1,30 +1,39 @@
FROM node:lts-alpine FROM node:lts-bullseye
RUN apk update && apk --no-cache add shadow && \ # THE ALL USER THINGS IS USELESS AS NODE IS ALREADY A USER @ 1000
usermod -u 1001 node && \
groupmod -g 1001 node
RUN find / -group 1000 -exec chgrp -h node {} \; # RUN find / -group 1000 -exec chgrp -h node {} \;
RUN find / -user 1000 -exec chown -h node {} \; # RUN find / -user 1000 -exec chown -h node {} \;
ARG USER_UID # ARG USER_UID
ARG USER_UNAME # ARG USER_UNAME
ARG USER_GID # ARG USER_GID
ARG USER_GNAME # ARG USER_GNAME
# RUN addgroup -g 1000 gdp && \ # # RUN addgroup -g 1000 gdp && \
# adduser -h /home/gdp -D -u 1000 gdp && \ # # adduser -h /home/gdp -D -u 1000 gdp && \
RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME} # RUN adduser -u ${USER_UID} -G users -s /bin/sh -D ${USER_UNAME}
# chown -R gdp:gdp /home/gdp # # chown -R gdp:gdp /home/gdp
USER ${USER_UNAME} # RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi
# RUN groupadd -g ${USER_GID} ${USER_GNAME}
# RUN useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME}
# RUN install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME}
# RUN chown --changes --silent --no-dereference --recursive \
# --from=33:33 ${USER_UID}:${USER_GID} \
# /home/${USER_UNAME}
COPY ./bashrc /home/${USER_UNAME}/.bashrc # USER ${USER_UNAME}
COPY ./inputrc /home/${USER_UNAME}/.inputrc
# COPY ./bashrc /home/${USER_UNAME}/.bashrc
# COPY ./inputrc /home/${USER_UNAME}/.inputrc
# COPY ./bashrc /home/node/.bashrc # should do an echo in already existing /home/node/.bashcr
COPY ./inputrc /home/node/.inputrc
COPY ./client-entrypoint.sh /usr/local/bin COPY ./client-entrypoint.sh /usr/local/bin
USER root # USER root
RUN chmod +x /usr/local/bin/client-entrypoint.sh RUN chmod +x /usr/local/bin/client-entrypoint.sh
USER ${USER_UNAME} # USER ${USER_UNAME}
CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"] CMD ["/bin/sh","/usr/local/bin/client-entrypoint.sh"]
+1 -1
View File
@@ -22,7 +22,7 @@ echo "APP_ENV $APP_ENV"
if [ "$APP_ENV" = "prod" ]; then if [ "$APP_ENV" = "prod" ]; then
echo "Run npm prod" echo "Run npm prod"
npm run prod npm run build
else else
echo "Run npm dev" echo "Run npm dev"
npm run dev npm run dev
+1 -1
View File
@@ -1,5 +1,5 @@
upstream app{ upstream app{
server app:8988; server app:5173;
} }
server { server {
+4 -1
View File
@@ -21,6 +21,9 @@ build:
buildnc: buildnc:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
buildncapp:
docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) app
downbuildup: down build up downbuildup: down build up
up: up:
@@ -56,7 +59,7 @@ exec_api:
docker exec -it ouatterrir-api-1 bash docker exec -it ouatterrir-api-1 bash
exec_app: exec_app:
docker exec -it ouatterrir-app-1 sh docker exec -it ouatterrir-app-1 bash
restart_app: restart_app:
docker-compose restart app docker-compose restart app
+1 -1
Submodule app updated: 3149c92f11...1a7ecfad8f
+2 -1
View File
@@ -71,10 +71,11 @@ services:
- app - app
- server - server
ports: ports:
- 8988:8988 - 5173:5173
working_dir: "/app" working_dir: "/app"
environment: environment:
- APP_ENV=dev - APP_ENV=dev
tty: true
nginx: nginx:
build: ./Docker/nginx/ build: ./Docker/nginx/