Compare commits
6 Commits
3e49d3306f
...
df15d609c8
Author | SHA1 | Date | |
---|---|---|---|
df15d609c8 | |||
bde980536d | |||
e6ebf6ca78 | |||
9a16fa65c9 | |||
8ba89d1885 | |||
10772a8d6f |
@ -1,28 +1,34 @@
|
|||||||
name: Build and publish the docker image
|
name: docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["custom"]
|
branches:
|
||||||
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- "README.md"
|
||||||
|
- "LICENSE.txt"
|
||||||
|
- "docker-compose.example.yml"
|
||||||
|
- "ups.json"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: git.ngn.tf
|
REGISTRY: git.ngn.tf
|
||||||
IMAGE: ${{gitea.repository}}
|
IMAGE: ${{gitea.repository}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: "https://github.com/actions/checkout@v4"
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to container repo
|
- name: Login to container repo
|
||||||
uses: "https://github.com/docker/login-action@v1"
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
registry: ${{env.REGISTRY}}
|
registry: ${{env.REGISTRY}}
|
||||||
username: ${{gitea.actor}}
|
username: ${{gitea.actor}}
|
||||||
password: ${{secrets.PACKAGES_TOKEN}}
|
password: ${{secrets.PACKAGES_TOKEN}}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
docker build . --tag ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
||||||
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
docker push ${{env.REGISTRY}}/${{env.IMAGE}}:latest
|
25
.gitea/workflows/ups.yml
Normal file
25
.gitea/workflows/ups.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: ups
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "@weekly"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ups:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update -y
|
||||||
|
sudo apt install -y python3 python3-build python3-requests make
|
||||||
|
|
||||||
|
- name: Install ups
|
||||||
|
run: |
|
||||||
|
git clone https://git.ngn.tf/ngn/ups && cd ups
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
- name: Run ups
|
||||||
|
run: PATH=~/.local/bin:$PATH ups-check
|
10
Dockerfile
10
Dockerfile
@ -1,20 +1,12 @@
|
|||||||
FROM node:lts-alpine AS deps
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json pnpm-lock.yaml ./
|
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
|
||||||
RUN pnpm install --frozen-lockfile
|
|
||||||
|
|
||||||
FROM node:lts-alpine AS builder
|
FROM node:lts-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN npm install -g pnpm
|
RUN npm install -g pnpm
|
||||||
|
RUN pnpm install
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
FROM node:lts-alpine AS runner
|
FROM node:lts-alpine AS runner
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# [ngn.tf] | libremdb
|
# libremdb - IMDb frontend
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|
|
||||||
A fork of the [libremdb](https://github.com/zyachel/libremdb) project, with my personal changes.
|
A fork of the [libremdb](https://github.com/zyachel/libremdb) project, with my
|
||||||
|
personal changes.
|
||||||
|
@ -3,16 +3,16 @@ services:
|
|||||||
container_name: libremdb
|
container_name: libremdb
|
||||||
image: git.ngn.tf/ngn/libremdb
|
image: git.ngn.tf/ngn/libremdb
|
||||||
ports:
|
ports:
|
||||||
- 80:3000
|
- 80:3000
|
||||||
env_file: .env.example
|
env_file: .env.example
|
||||||
depends_on:
|
depends_on:
|
||||||
- libremdb_redis
|
- libremdb_redis
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /opt/app/.next/cache/:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
- /app/.next/cache/:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
cap_drop:
|
cap_drop:
|
||||||
- ALL
|
- ALL
|
||||||
user: 65534:65534 # equivalent to the nobody user
|
user: 65534:65534 # equivalent to the nobody user
|
||||||
read_only: true
|
read_only: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@ -22,10 +22,10 @@ services:
|
|||||||
image: redis
|
image: redis
|
||||||
user: nobody
|
user: nobody
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /data:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
- /data:size=10M,mode=0770,uid=65534,gid=65534,noexec,nosuid,nodev
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
cap_drop:
|
cap_drop:
|
||||||
- ALL
|
- ALL
|
||||||
read_only: true
|
read_only: true
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.29.0",
|
"axios": "^0.27.2",
|
||||||
"cheerio": "1.0.0",
|
"cheerio": "1.0.0-rc.12",
|
||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"next": "12.2.5",
|
"next": "12.2.5",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
@ -26,7 +26,7 @@
|
|||||||
"sharp": "^0.33.1"
|
"sharp": "^0.33.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.19.71",
|
"@types/node": "18.7.3",
|
||||||
"@types/react": "18.0.17",
|
"@types/react": "18.0.17",
|
||||||
"@types/react-dom": "18.0.6",
|
"@types/react-dom": "18.0.6",
|
||||||
"eslint": "8.22.0",
|
"eslint": "8.22.0",
|
||||||
|
622
pnpm-lock.yaml
generated
622
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user