Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamarcke committed Nov 3, 2024
1 parent 798d821 commit 6f7e55b
Show file tree
Hide file tree
Showing 64 changed files with 26,695 additions and 5,503 deletions.
21 changes: 0 additions & 21 deletions .commitlintrc

This file was deleted.

15 changes: 12 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"extends": ["next/core-web-vitals", "prettier"],
"extends": [
"next/core-web-vitals",
"next/typescript",
"prettier"
],
"rules": {
"react/no-unescaped-entities": "off"
}
"react/no-unescaped-entities": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-object-type": "warn",
"react-hooks/exhaustive-deps": "error"
},
"ignorePatterns": ["src/wrapper/**/*"]
}
39 changes: 0 additions & 39 deletions .versionrc

This file was deleted.

59 changes: 59 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM node:20-alpine AS base

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* ./
RUN yarn --frozen-lockfile


# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
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

RUN yarn build

# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

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

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

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3001

ENV PORT 3001
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]
27 changes: 0 additions & 27 deletions biome.json

This file was deleted.

Binary file removed bun.lockb
Binary file not shown.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3"

services:
web-admin:
hostname: web-admin
image: lamarcke/game-node-admin:latest

# NEXT_PUBLIC_ variables can only be defined before build-time, so adding them here won't work.
# Use the .env.(environment) files.
environment:
NODE_ENV: production

networks:
- game_node_app_public

ports:
- "3001:3001"


networks:
game_node_app_public:
external: true
7 changes: 2 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
reactStrictMode: true,
swcMinify: true,
experimental: {
optimizePackageImports: ["@mantine/core", "@mantine/hooks"],
},
output: "standalone",
reactStrictMode: true,
};
Loading

0 comments on commit 6f7e55b

Please sign in to comment.