Compare commits
No commits in common. "07e68cb37ba28679a5170057e9cff071436c79d1" and "b7f4f7b2c8cd44a1b30186ff312c29ccc99b36bf" have entirely different histories.
07e68cb37b
...
b7f4f7b2c8
@ -24,6 +24,30 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|||||||
wget
|
wget
|
||||||
|
|
||||||
|
|
||||||
|
# Copy and install node package dependencies
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts=false --foreground-scripts --verbose
|
||||||
|
|
||||||
|
# Copy Prisma schema and generate client
|
||||||
|
COPY prisma ./prisma
|
||||||
|
RUN npx prisma generate
|
||||||
|
|
||||||
|
# Copy the rest of the app code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build the node app
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,27 +82,8 @@ RUN \
|
|||||||
ipfs init
|
ipfs init
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Copy and install node package dependencies
|
|
||||||
COPY package.json package-lock.json prisma ./
|
|
||||||
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts=false --foreground-scripts --verbose
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.npm \
|
|
||||||
--mount=type=cache,target=/app/node_modules \
|
|
||||||
npm install --ignore-scripts=false --foreground-scripts --verbose && \
|
|
||||||
npx prisma generate
|
|
||||||
|
|
||||||
|
|
||||||
# Copy the rest of the app code
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build the node app
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
|
|
||||||
# Expose the port
|
# Expose the port
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
# Start the app
|
# Start the app
|
||||||
CMD ["npm", "run", "start:server"]
|
CMD ["npm", "run", "start:server"]
|
||||||
|
|
||||||
|
|||||||
67
services/our/Dockerfile.old
Normal file
67
services/our/Dockerfile.old
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
FROM node:22
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system-level dependencies
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
git \
|
||||||
|
inotify-tools \
|
||||||
|
ffmpeg \
|
||||||
|
mktorrent \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Shaka Packager
|
||||||
|
RUN wget -q https://github.com/shaka-project/shaka-packager/releases/download/v3.4.2/packager-linux-x64 \
|
||||||
|
-O /usr/local/bin/packager \
|
||||||
|
&& chmod +x /usr/local/bin/packager \
|
||||||
|
&& packager --version
|
||||||
|
|
||||||
|
# Install IPFS Kubo
|
||||||
|
COPY --from=ipfs/kubo:v0.36.0 /usr/local/bin/ipfs /usr/local/bin/ipfs
|
||||||
|
RUN ipfs init
|
||||||
|
|
||||||
|
# Bundle the vibeui pytorch model
|
||||||
|
RUN mkdir -p /app/vibeui \
|
||||||
|
&& wget -q https://gitea.futureporn.net/futureporn/fp/raw/branch/main/apps/vibeui/public/vibeui.pt -O /app/vibeui/vibeui.pt \
|
||||||
|
&& wget -q https://gitea.futureporn.net/futureporn/fp/raw/branch/main/apps/vibeui/public/data.yaml -O /app/vibeui/data.yaml
|
||||||
|
|
||||||
|
# Install openwhisper
|
||||||
|
COPY --from=ghcr.io/ggml-org/whisper.cpp:main-e7bf0294ec9099b5fc21f5ba969805dfb2108cea /app /app/whisper.cpp
|
||||||
|
ENV PATH="$PATH:/app/whisper.cpp/build/bin"
|
||||||
|
ENV LD_LIBRARY_PATH="/app/whisper.cpp/build/src:/app/whisper.cpp/build/ggml/src:/usr/local/lib:/usr/lib"
|
||||||
|
|
||||||
|
# Install b2-cli
|
||||||
|
RUN wget https://github.com/Backblaze/B2_Command_Line_Tool/releases/download/v4.4.1/b2-linux -O /usr/local/bin/b2 && chmod +x /usr/local/bin/b2
|
||||||
|
|
||||||
|
# Copy and install dependencies
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts=false --foreground-scripts --verbose
|
||||||
|
|
||||||
|
# Copy Prisma schema and generate client
|
||||||
|
COPY prisma ./prisma
|
||||||
|
RUN npx prisma generate
|
||||||
|
|
||||||
|
# Copy the rest of the code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Build the app
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Setup Python virtualenv
|
||||||
|
RUN python3 -m venv /app/venv
|
||||||
|
ENV PATH="/app/venv/bin:$PATH"
|
||||||
|
|
||||||
|
# Install python deps
|
||||||
|
RUN ./venv/bin/pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Expose the port
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
# Start the app
|
||||||
|
CMD ["npm", "run", "start:server"]
|
||||||
@ -11,13 +11,6 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
deploy:
|
|
||||||
replicas: 1
|
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
delay: 5s
|
|
||||||
max_attempts: 5
|
|
||||||
window: 60s
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: gitea.futureporn.net/futureporn/our:latest
|
image: gitea.futureporn.net/futureporn/our:latest
|
||||||
@ -45,20 +38,6 @@ services:
|
|||||||
sh -c "npm run start:worker"
|
sh -c "npm run start:worker"
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/vfs/futureporn:/mnt/vfs/futureporn
|
- /mnt/vfs/futureporn:/mnt/vfs/futureporn
|
||||||
deploy:
|
|
||||||
replicas: 2
|
|
||||||
restart_policy:
|
|
||||||
condition: on-failure
|
|
||||||
delay: 5s
|
|
||||||
max_attempts: 5
|
|
||||||
window: 60s
|
|
||||||
update_config:
|
|
||||||
parallelism: 1
|
|
||||||
delay: 10s
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpus: "0.5"
|
|
||||||
memory: 2G
|
|
||||||
|
|
||||||
qbittorrent:
|
qbittorrent:
|
||||||
image: gitea.futureporn.net/futureporn/qbittorrent-nox:latest
|
image: gitea.futureporn.net/futureporn/qbittorrent-nox:latest
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "futureporn-our",
|
"name": "futureporn-our",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.8.29",
|
"version": "2.8.27",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently npm:dev:serve npm:dev:build:server npm:dev:build:client npm:dev:worker npm:dev:compose npm:dev:sftp npm:dev:qbittorrent npm:dev:tailscale",
|
"dev": "concurrently npm:dev:serve npm:dev:build:server npm:dev:build:client npm:dev:worker npm:dev:compose npm:dev:sftp npm:dev:qbittorrent npm:dev:tailscale",
|
||||||
@ -116,4 +116,4 @@
|
|||||||
"prisma": {
|
"prisma": {
|
||||||
"seed": "tsx prisma/seed.ts"
|
"seed": "tsx prisma/seed.ts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user