Compare commits

..
2 Commits
Author SHA1 Message Date
thumapas afe9b061b1 added platform support for arm in building
Build and Push Docker Image / build-and-push (push) Successful in 2m51s
2026-09-29 10:21:33 +02:00
thumapas c0b582debb ci/cd for gitea, custom ollama url
Build and Push Docker Image / build-and-push (push) Successful in 32s
2026-09-29 10:12:38 +02:00
5 changed files with 1444 additions and 1 deletions

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
env:
REGISTRY: gitea.pascalyazid.com
IMAGE_NAME: pascalyazid/quick-ling
TAG: latest
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.TAG }}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
OLLAMA_URL=${{ secrets.OLLAMA_URL }}
+34
View File
@@ -0,0 +1,34 @@
# Stage 1: Build
FROM oven/bun:latest AS builder
WORKDIR /app
# Copy dependency files and install
COPY package.json bun.lockb* ./
RUN bun install
# Copy source code
COPY . .
ARG OLLAMA_URL
ENV OLLAMA_URL=$OLLAMA_URL
# Build with the Bun Nitro preset
RUN NITRO_PRESET=bun bun run build
# Stage 2: Production
FROM oven/bun:latest
WORKDIR /app
ENV NODE_ENV=production
# Copy only the built output from the builder stage
COPY --from=builder /app/.output ./.output
# Tell Nuxt to bind to all network interfaces inside the container
ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
# Execute the server entrypoint
CMD ["bun", "run", ".output/server/index.mjs"]
+1344
View File
File diff suppressed because it is too large. Load diff
+13
View File
@@ -0,0 +1,13 @@
version: '3.8'
services:
nuxt-app:
image: gitea.pascalyazid.com/pascalyazid/quick-ling:latest
container_name: nuxt-bun-app
restart: unless-stopped
ports:
- "${PORT:-3000}:3000"
environment:
- OLLAMA_URL
+1 -1
View File
@@ -16,7 +16,7 @@ export default defineNuxtConfig({
}
},
runtimeConfig: {
ollamahost: 'http://localhost:11434',
ollamahost: process.env.OLLAMA_URL || 'http://localhost:11434',
ollamamodel: 'translategemma:4b'
},
css: ['~/assets/css/main.css']