Skip to content

Commit

Permalink
Merge branch 'v1.4.1' into renovate/next-themes-0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Limerio authored May 4, 2024
2 parents eed887c + 9b73c58 commit 414ee07
Show file tree
Hide file tree
Showing 89 changed files with 4,881 additions and 779 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
DATABASE_URL="mongodb://USERNAME:PASSWORD@HOST:PORT/DATABASE"
NEXT_PUBLIC_API_MOCKING= #enabled
NEXT_PUBLIC_API_MOCKING= #enabled
PASSWORD_SALT=10
JWT_SECRET_KEY=""
RESEND_KEY=""
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM node:20-alpine AS base

FROM base AS deps
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 npm ci


FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ENV NEXT_TELEMETRY_DISABLED 1

RUN npm run format

RUN npm run build

FROM base AS runner
WORKDIR /app

ENV NODE_ENV production

ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

RUN mkdir .next
RUN chown nextjs:nodejs .next

COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000

CMD HOSTNAME="0.0.0.0" node server.js
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
version: "3.7"

services:
mongodb:
image: mongo:5.0.25-focal
image: mongo:6.0.4-focal
container_name: database
ports:
- 27017:27017
Expand Down
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const withPwa = nextPwa({
disable: process.env.NODE_ENV === "development",
})
const nextConfig = withPwa({
output: "standalone",
reactStrictMode: true,
i18n: {
locales: ["en", "fr"],
Expand Down
Loading

0 comments on commit 414ee07

Please sign in to comment.