dockerize
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 39s

This commit is contained in:
Aidan 2025-01-23 23:41:12 -05:00
parent c4f9bfd0e8
commit 1714250476
5 changed files with 62 additions and 4 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
node_modules
.next
.vscode
.git
.gitignore
README.md
LICENSE

View File

@ -0,0 +1,30 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Log in to Gitea Package Registry
run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login $SERVER_URL -u $USERNAME --password-stdin
env:
SERVER_URL: ${{ secrets.SERVER_URL }}
USERNAME: ${{ secrets.USERNAME }}
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
- name: Build Docker Image
run: docker build -t git.pontusmail.org/LibreCloud/web:latest .
- name: Push Docker Image
run: docker push git.pontusmail.org/LibreCloud/web:latest

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM oven/bun:1 AS base
WORKDIR /app
COPY package.json ./
COPY bun.lockb ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
EXPOSE 3000
CMD ["bun", "start"]

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
librecloud-web:
image: "git.pontusmail.org/LibreCloud/web:latest"
ports:
- "3000:3000"
environment:
- NODE_ENV=production
restart: unless-stopped

View File

@ -1,7 +1,9 @@
import type { NextConfig } from "next";
import type { NextConfig } from "next"
/** @type {NextConfig} */
const nextConfig: NextConfig = {
/* config options here */
};
reactStrictMode: true,
output: "standalone",
}
export default nextConfig;
export default nextConfig