ci: Docker build and Gitea Actions deploy workflow

This commit is contained in:
achmad
2026-05-28 22:34:30 +07:00
parent 2293695270
commit ffa8b73f4d
4 changed files with 38 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
node_modules
.next
.env.local
.git
docs
+17
View File
@@ -0,0 +1,17 @@
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build and redeploy
run: |
docker compose build kotobane
docker compose up -d --no-deps kotobane
+15
View File
@@ -0,0 +1,15 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]
+1
View File
@@ -1,5 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
images: {
remotePatterns: [
{