suppression reverse proxy (pour utiliser celui de rezel), maj node et netoyage

This commit is contained in:
Mathieu Oriol
2024-09-09 16:56:47 +02:00
parent 0921cfa54c
commit b3619c7380
3 changed files with 10 additions and 27 deletions

View File

@@ -1,15 +1,8 @@
services:
front:
build: ./traque-front
restart: always
reverse_proxy:
build: ./proxy
ports:
- "3000:443"
volumes:
# reusing the ssl files from the backend
- ./traque-back/ssl:/etc/nginx/ssl:ro
- "3000:3000"
build: ./traque-front
restart: always
back:

View File

@@ -1,5 +1,5 @@
# Use Node 16 alpine as parent image
FROM node:16-alpine
# Use Node 20 alpine as parent image
FROM node:20-alpine
# Change the working directory on the Docker image to /app
WORKDIR /app

View File

@@ -1,4 +1,4 @@
FROM node:18-alpine AS base
FROM node:20-alpine AS base
# Install dependencies only when needed
FROM base AS deps
@@ -7,13 +7,8 @@ RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
COPY package.json package-lock.json* ./
RUN npm ci
# Rebuild the source code only when needed
@@ -25,14 +20,9 @@ COPY . .
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED 1
RUN \
if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi
RUN npm run build
# Production image, copy all the files and run next
FROM base AS runner
@@ -40,7 +30,7 @@ WORKDIR /app
ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs