start to create docker compose things but hey, that's ok
This commit is contained in:
parent
f40b429b92
commit
47b6370d98
8 changed files with 5025 additions and 3152 deletions
|
@ -1,36 +1,40 @@
|
||||||
name: Check for Minor Dependency Updates
|
name: Update Minor Dependencies and Build Container
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *' # Runs every day at midnight (UTC)
|
- cron: '0 0 * * *' # Runs every night at midnight (UTC)
|
||||||
workflow_dispatch: # Allows manual triggering
|
workflow_dispatch: # Allows manual triggering
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-dependencies:
|
update-dependencies:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.FORGEJO_TOKEN }} # Make sure to add this token in your repo secrets
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
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
|
run: npm install
|
||||||
|
|
||||||
- name: Check for Minor Updates
|
- name: Check and Update Minor Dependencies
|
||||||
run: npx npm-check-updates --target minor
|
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: |
|
run: |
|
||||||
npx npm-check-updates --target minor > ncu-report.txt
|
git config --global user.name "forgejo-bot"
|
||||||
cat ncu-report.txt
|
git config --global user.email "bot@pweapon.org"
|
||||||
|
git add package.json
|
||||||
- name: Upload Report as Artifact
|
git commit -m "chore: update minor dependencies"
|
||||||
uses: actions/upload-artifact@v3
|
git push origin HEAD:${GITHUB_REF#refs/heads/}
|
||||||
with:
|
env:
|
||||||
name: ncu-report
|
GITHUB_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
path: ncu-report.txt
|
|
||||||
|
|
21
Dockerfile
Normal file
21
Dockerfile
Normal 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
16
compose.build.yml
Normal 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
9
compose.prod.yml
Normal 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
4956
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -17,6 +17,7 @@
|
||||||
"@eslint/compat": "^1.2.6",
|
"@eslint/compat": "^1.2.6",
|
||||||
"@eslint/js": "^9.19.0",
|
"@eslint/js": "^9.19.0",
|
||||||
"@sveltejs/adapter-auto": "^4.0.0",
|
"@sveltejs/adapter-auto": "^4.0.0",
|
||||||
|
"@sveltejs/adapter-node": "^5.2.12",
|
||||||
"@sveltejs/kit": "^2.17.1",
|
"@sveltejs/kit": "^2.17.1",
|
||||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||||
"@tailwindcss/forms": "^0.5.10",
|
"@tailwindcss/forms": "^0.5.10",
|
||||||
|
|
3134
pnpm-lock.yaml
generated
3134
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,4 @@
|
||||||
import adapter from '@sveltejs/adapter-auto';
|
import adapter from '@sveltejs/adapter-node';
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
|
Loading…
Add table
Reference in a new issue