-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM oven/bun:alpine AS base
WORKDIR /app
FROM base AS deps
RUN apk add --no-cache libc6-compat
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
FROM base AS builder
COPY --from=deps /app/node_modules node_modules
COPY . .
RUN bun run build --experimental-build-mode compile
FROM base AS runner
RUN apk add --no-cache curl
COPY --from=builder /app/.next/standalone .
COPY --from=builder /app/.next/static .next/static
RUN mkdir .next/cache && chmod 777 .next/cache
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV PRODUCTION_URL=https://ss13.tr
ENV CDN_URL=https://cdn.ss13.tr
ENV SERVER_GITHUB=https://github.com/psychonaut-station/PsychonautStation
ENV API_URL=https://api.ss13.tr
ENV API_KEY=hello
ENV AUTH_DISCORD_ID=1234567890
ENV AUTH_DISCORD_SECRET=ABCDEFGHI
ENV NEXTAUTH_SECRET=herhangi_bir_rastgele_uzun_karakter_dizisi
ENV NEXTAUTH_URL=https://ss13.tr
ENV VERIFY_WEBHOOK_URL=https://discord.com/api/webhooks/*
USER bun
EXPOSE 3000
ENTRYPOINT [ "bun", "run", "server.js" ]
HEALTHCHECK CMD curl -f http://localhost:3000/ || exit 1