Add build files
All checks were successful
Deploy Site / docker (ubuntu-latest, 2.44.0) (push) Successful in 2m26s
All checks were successful
Deploy Site / docker (ubuntu-latest, 2.44.0) (push) Successful in 2m26s
This commit is contained in:
parent
d8e19a2eed
commit
65b4a46f73
32
.gitea/workflows/deploy.yml
Normal file
32
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Deploy Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["master"]
|
||||||
|
paths-ignore:
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
- docker-compose.yml
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: ["ubuntu-latest"]
|
||||||
|
git-version: ["2.44.0"]
|
||||||
|
runs-on: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
# Steps to run
|
||||||
|
steps:
|
||||||
|
# Checkout the repo
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# Deploy to Dokku
|
||||||
|
- name: Deploy to Dokku
|
||||||
|
uses: dokku/github-action@master
|
||||||
|
with:
|
||||||
|
git_remote_url: "ssh://dokku@10.10.3.28:22/rainnny-club"
|
||||||
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
46
Dockerfile
Normal file
46
Dockerfile
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
FROM imbios/bun-node AS base
|
||||||
|
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
FROM base AS depends
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY package.json* bun.lockb* ./
|
||||||
|
RUN bun install --frozen-lockfile --quiet
|
||||||
|
|
||||||
|
|
||||||
|
# Build the app
|
||||||
|
FROM base AS builder
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY --from=depends /usr/src/app/node_modules ./node_modules
|
||||||
|
COPY . .
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
|
||||||
|
RUN bun run build
|
||||||
|
|
||||||
|
|
||||||
|
# Run the app
|
||||||
|
FROM base AS runner
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
RUN addgroup --system --gid 1007 nextjs
|
||||||
|
RUN adduser --system --uid 1007 nextjs
|
||||||
|
|
||||||
|
RUN mkdir .next
|
||||||
|
RUN chown nextjs:nextjs .next
|
||||||
|
|
||||||
|
COPY --from=builder --chown=nextjs:nextjs /usr/src/app/.next/standalone ./
|
||||||
|
COPY --from=builder --chown=nextjs:nextjs /usr/src/app/.next ./.next
|
||||||
|
COPY --from=builder --chown=nextjs:nextjs /usr/src/app/public ./public
|
||||||
|
COPY --from=builder --chown=nextjs:nextjs /usr/src/app/next.config.mjs ./next.config.mjs
|
||||||
|
COPY --from=builder --chown=nextjs:nextjs /usr/src/app/package.json ./package.json
|
||||||
|
|
||||||
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
# Exposting on port 80 so we can
|
||||||
|
# access via a reverse proxy for Dokku
|
||||||
|
ENV HOSTNAME "0.0.0.0"
|
||||||
|
EXPOSE 80
|
||||||
|
ENV PORT 80
|
||||||
|
|
||||||
|
USER nextjs
|
||||||
|
CMD node server.js
|
@ -1,5 +1,6 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
|
output: "standalone",
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user