Added docker files
This commit is contained in:
14
.dockerignore
Normal file
14
.dockerignore
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
.git
|
||||||
|
.next
|
||||||
|
node_modules
|
||||||
|
.dockerignore
|
||||||
|
.env
|
||||||
|
.envrc
|
||||||
|
.gitignore
|
||||||
|
.npmrc
|
||||||
|
AGENTS.md
|
||||||
|
api.http
|
||||||
|
components.json
|
||||||
|
docker-compose.yml
|
||||||
|
Dockerfile
|
||||||
|
dprint.json
|
||||||
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM oven/bun AS base
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
COPY package.json bun.lock ./
|
||||||
|
RUN bun i --frozen-lockfile
|
||||||
|
COPY . .
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs && chown -R nextjs:nodejs .
|
||||||
|
|
||||||
|
USER nextjs
|
||||||
|
EXPOSE 3000
|
||||||
|
ENV PORT=3000
|
||||||
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
|
||||||
|
CMD ["bun", "container:build"]
|
||||||
13
docker-compose.yml
Normal file
13
docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
services:
|
||||||
|
stats-hypixel:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: stats-hypixel
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
environment:
|
||||||
|
- MAINTENANCE_MODE=${MAINTENANCE_MODE}
|
||||||
|
- HYPIXEL_API_KEY=${HYPIXEL_API_KEY}
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
"build": "next build --turbopack",
|
"build": "next build --turbopack",
|
||||||
|
"container:build": "bun run build && bun start",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"typegen": "next typegen",
|
"typegen": "next typegen",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
|||||||
Reference in New Issue
Block a user