start to create docker compose things but hey, that's ok

This commit is contained in:
0d0 2025-02-06 12:42:06 +01:00
parent f40b429b92
commit 47b6370d98
8 changed files with 5025 additions and 3152 deletions

View file

@ -1,36 +1,40 @@
name: Check for Minor Dependency Updates
name: Update Minor Dependencies and Build Container
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight (UTC)
workflow_dispatch: # Allows manual triggering
- cron: '0 0 * * *' # Runs every night at midnight (UTC)
workflow_dispatch: # Allows manual triggering
jobs:
check-dependencies:
update-dependencies:
runs-on: docker
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.FORGEJO_TOKEN }} # Make sure to add this token in your repo secrets
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Adjust the Node.js version as needed
node-version: '20' # Adjust as needed
- name: Install Dependencies
- name: Configure npm version
run: npm install
- name: Check for Minor Updates
run: npx npm-check-updates --target minor
- name: Check and Update Minor Dependencies
run: npx npm-check-updates --target minor -u
- name: Save ncu Results
- name: Install Updated Dependencies
run: npm install
- name: Commit and Push Changes
run: |
npx npm-check-updates --target minor > ncu-report.txt
cat ncu-report.txt
- name: Upload Report as Artifact
uses: actions/upload-artifact@v3
with:
name: ncu-report
path: ncu-report.txt
git config --global user.name "forgejo-bot"
git config --global user.email "bot@pweapon.org"
git add package.json
git commit -m "chore: update minor dependencies"
git push origin HEAD:${GITHUB_REF#refs/heads/}
env:
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM node:20
WORKDIR /usr
COPY package.json ./
COPY package-lock.json ./
RUN npm ci
COPY . ./
RUN npm run build
# RUN npm run add-sigint
FROM node:20
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm ci
COPY . ./
COPY --from=build /usr/build /app
EXPOSE 8000
CMD ["node", "/app"]

16
compose.build.yml Normal file
View file

@ -0,0 +1,16 @@
services:
downloader:
image: git.pweapon.org/odo/dowloader:latest
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
ORIGIN: '${ORIGIN}'
PORT: 9500
ports:
- 9500:9500
version_tag:
extends: frontend
image: git.pweapon.org/odo/dowloader:latest

9
compose.prod.yml Normal file
View file

@ -0,0 +1,9 @@
services:
frontend:
image: git.pweapon.org/odo/dowloader:latest
restart: always
environment:
ORIGIN: '${ORIGIN}'
PORT: 9500
ports:
- 127.0.0.1:9500:9500

4956
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,7 @@
"@eslint/compat": "^1.2.6",
"@eslint/js": "^9.19.0",
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/adapter-node": "^5.2.12",
"@sveltejs/kit": "^2.17.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tailwindcss/forms": "^0.5.10",

3134
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */