From 2032856ad3a0fcf36f4ffb593a4a99f31e7cd3b4 Mon Sep 17 00:00:00 2001 From: x Date: Sat, 8 Mar 2025 13:19:55 +0100 Subject: [PATCH] g --- .gitignore | 2 ++ .gitmodules | 3 ++ conf/locale.gen | 1 + config_example.json | 84 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yaml | 55 +++++++++++++++++++++++++++++ f0ck.dockerfile | 11 ++++++ 6 files changed, 156 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 conf/locale.gen create mode 100644 config_example.json create mode 100644 docker-compose.yaml create mode 100644 f0ck.dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..79d10ba --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +config.json +f0ckv2 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e6fe133 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "f0ckv2"] + path = f0ckv2 + url = gitea@git.lat:f0ck/f0ckv2.git diff --git a/conf/locale.gen b/conf/locale.gen new file mode 100644 index 0000000..a1b8ba1 --- /dev/null +++ b/conf/locale.gen @@ -0,0 +1 @@ +en_US.UTF-8 UTF-8 \ No newline at end of file diff --git a/config_example.json b/config_example.json new file mode 100644 index 0000000..5caef68 --- /dev/null +++ b/config_example.json @@ -0,0 +1,84 @@ +{ + "main": { + "url": { + "full": "", + "domain": "", + "regex": "blah\\.tld" + }, + "socks": "", + "maxfilesize": 83886080, + "adminmultiplier": 3.5, + "ignored": [ + ] + }, + "allowedModes": [ "sfw", "nsfw", "untagged", "all" ], + "allowedMimes": [ "audio", "image", "video" ], + "nsfp": [ ], + "websrv": { + "port": "1338", + "paths": { + "images": "/b", + "thumbnails": "/t", + "coverarts": "/ca" + }, + "themes": [ "f0ck", "p1nk", "orange", "atmos", "amoled", "paper", "term", "iced", "f0ck95", "f0ck95d" ], + "eps": 300, + "cache": false, + "phrases": [ + "foo", + "bar" + ] + }, + "clients": [{ + "type": "tg", + "enabled": true, + "token": "", + "pollrate": 1001 + }, { + "type": "irc", + "enabled": false, + "network": "", + "host": "", + "port": 6697, + "ssl": true, + "selfSigned": false, + "sasl": false, + "nickname": "", + "username": "", + "password": "", + "realname": "", + "channels": [ + ] + }], + "sql": { + "host": "localhost", + "user": "", + "password": "", + "database": "", + "multipleStatements": true + }, + "admins": [{ + "prefix": "", + "level": 100 + }], + "mimes": { + "image/png": "png", + "video/webm": "webm", + "image/gif": "gif", + "image/jpg": "jpg", + "image/jpeg": "jpeg", + "image/webp": "webp", + "video/mp4": "mp4", + "video/quicktime": "mp4", + "audio/mpeg": "mpg", + "audio/mp3": "mp3", + "audio/ogg": "ogg", + "audio/opus": "opus", + "audio/flac": "flac", + "audio/x-flac": "flac", + "video/x-m4v": "mp4", + "video/x-matroska": "mkv" + }, + "apis": { + } +} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..1e58e32 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,55 @@ +version: '3.5' + +services: + f0ck: + container_name: f0ck-dockerv + image: f0ck-dockerv4 + networks: + - f0cked + volumes: + - f0ck-data-b:/opt/f0ckv2/public/f0ck-b + - f0ck-data-ca:/opt/f0ckv2/public/f0ck-ca + - f0ck-data-t:/opt/f0ckv2/public/f0ck-t + ports: + - "1338:1338" + restart: on-failure + postgres: + container_name: f0ck_postgres + image: postgres + environment: + POSTGRES_DB: f0ckv2 + POSTGRES_USER: f0ck + POSTGRES_PASSWORD: f0ck + PGDATA: /data/postgres + volumes: + - postgres:/data/postgres + ports: + - "5432:5432" + networks: + - f0cked + restart: unless-stopped + + # pgadmin: + # container_name: pgadmin_container + # image: dpage/pgadmin4 + # environment: + # PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} + # PGADMIN_CONFIG_SERVER_MODE: 'False' + # volumes: + # - pgadmin:/var/lib/pgadmin + + # ports: + # - "5050:80" + # networks: + # - f0cked + # restart: unless-stopped + +networks: + f0cked: + driver: bridge + +volumes: + postgres: + f0ck-data-b: + f0ck-data-ca: + f0ck-data-t: diff --git a/f0ck.dockerfile b/f0ck.dockerfile new file mode 100644 index 0000000..65165ef --- /dev/null +++ b/f0ck.dockerfile @@ -0,0 +1,11 @@ +FROM archlinux +RUN pacman -Syy --noconfirm +RUN pacman -S nodejs npm ffmpeg yt-dlp ffmpegthumbnailer postgresql imagemagick git mailcap --noconfirm + +WORKDIR /opt/f0ckv2 +VOLUME ./f0ckv2 /opt/f0ckv2 +ENTRYPOINT ["npm", "run", "start"] +COPY f0ckv2/ /opt/f0ckv2 +RUN npm i +RUN mkdir -p public/ca deleted/{ca,b,t} +COPY config.json /opt/f0ckv2/ \ No newline at end of file