diff --git a/backend/Dockerfile b/backend/Dockerfile index 6f48716..8199a95 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,18 +8,10 @@ RUN npm install \ && npm run build # Stage 2: Create the final image without source files -FROM node:20 +FROM ghcr.io/ticketz-oss/node WORKDIR /usr/src/app -# Install dumb-init and dockerize -ENV DOCKERIZE_VERSION v0.7.0 -RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_$(uname -m) \ - && chmod +x /usr/local/bin/dumb-init \ - && wget -O /usr/local/bin/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-$(dpkg --print-architecture)-${DOCKERIZE_VERSION}.tar.gz \ - && tar -C /usr/local/bin -xzvf /usr/local/bin/dockerize.tar.gz \ - && rm /usr/local/bin/dockerize.tar.gz - # Copy only the necessary build artifacts from the build stage COPY --from=build /usr/src/app/dist ./dist COPY --from=build /usr/src/app/node_modules ./node_modules diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 7f75b41..a11d5eb 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -9,20 +9,10 @@ RUN npm install \ && echo -e "\n\nBulding...\n" \ && npm run build -FROM nginx:alpine - -ENV DOCKERIZE_VERSION v0.7.0 -RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_$(uname -m) \ - && chmod +x /usr/local/bin/dumb-init \ - && LARCH=$(if [ "$(uname -m)" == "aarch64" ] ; then echo "arm64" ; elif [ "$(uname -m)" == "x86_64" ] ; then echo "amd64" ; else uname -m ; fi) \ - && wget -O /usr/local/bin/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-${LARCH}-${DOCKERIZE_VERSION}.tar.gz \ - && tar -C /usr/local/bin -xzvf /usr/local/bin/dockerize.tar.gz \ - && rm /usr/local/bin/dockerize.tar.gz +FROM ghcr.io/ticketz-oss/nginx-alpine WORKDIR /usr/share/nginx/html -RUN rm -rf /usr/share/nginx/html/* - COPY --from=build-deps /usr/src/app/build /var/www/public COPY --from=build-deps /usr/src/app/node_modules/@socket.io/admin-ui/ui/dist /var/www/public/socket-admin COPY nginx /etc/nginx