mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-12-12 03:06:40 +00:00
Compare commits
7 Commits
24441720d6
...
06d8b2e36c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06d8b2e36c | ||
|
|
59acc534fa | ||
|
|
fdd13085c3 | ||
|
|
8923bf3f63 | ||
|
|
a02087915b | ||
|
|
e6e230ab84 | ||
|
|
b3aece1e41 |
@@ -1,6 +1,10 @@
|
|||||||
# Sucker
|
# Sucker
|
||||||
|
|
||||||
Check package.json for commands, I can't be bothered.
|
### Usage
|
||||||
|
|
||||||
|
Pull this repostory and build with `npm run build`. You can start the server with `node ./.next/standalone/server.js`
|
||||||
|
|
||||||
|
You can also build and run Sucker as a Docker container with `docker compose build` and `docker compose up`.
|
||||||
|
|
||||||
### Changelog
|
### Changelog
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,3 @@ services:
|
|||||||
image: sucker
|
image: sucker
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
|
||||||
NODE_ENV: production
|
|
||||||
|
|||||||
21
dockerfile
21
dockerfile
@@ -1,7 +1,5 @@
|
|||||||
FROM node:22-alpine AS base
|
FROM node:22-alpine AS base
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* ./
|
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* ./
|
||||||
RUN \
|
RUN \
|
||||||
@@ -12,23 +10,22 @@ RUN \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM base AS runner
|
FROM node:22-alpine AS runner
|
||||||
ENV NODE_ENV=production
|
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
|
||||||
|
COPY --from=builder /app/.next/standalone ./
|
||||||
|
COPY --from=builder /app/.next/static ./.next/static
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
COPY --from=builder /app/.next ./.next
|
|
||||||
COPY --from=builder /app/node_modules ./node_modules
|
|
||||||
COPY --from=builder /app/package.json ./package.json
|
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["npm", "start"]
|
CMD ["node", "server.js"]
|
||||||
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/dev/types/routes.d.ts";
|
import "./.next/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
7
next.config.js
Normal file
7
next.config.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/** @type {import('next').NextConfig} */
|
||||||
|
const nextConfig = {
|
||||||
|
output: 'standalone',
|
||||||
|
productionBrowserSourceMaps: false,
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = nextConfig;
|
||||||
Reference in New Issue
Block a user