From 0fdf59659e5f8aed2e3090fd17ba59b164a03b68 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Tue, 19 Nov 2024 22:52:48 -0300 Subject: [PATCH] 0.9.3.1: Update Dockerfile and add compose file --- Dockerfile | 6 +++--- config/config.example.yml | 2 -- docker-compose.yml | 11 +++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index e848066..3e06b49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Based on https://github.com/iv-org/invidious/blob/master/docker/Dockerfile -FROM crystallang/crystal:1.13.2-alpine AS builder +FROM crystallang/crystal:1.14.0-alpine AS builder RUN apk add --no-cache sqlite-static yaml-static @@ -19,8 +19,8 @@ RUN crystal build ./src/file-uploader-crystal.cr \ --release \ --static --warnings all -RUN apk add --no-cache tini -FROM alpine:3.18 +FROM alpine:3.20 +RUN apk add --no-cache tini ffmpeg WORKDIR /file-uploader-crystal RUN addgroup -g 1000 -S file-uploader-crystal && \ adduser -u 1000 -S file-uploader-crystal -G file-uploader-crystal diff --git a/config/config.example.yml b/config/config.example.yml index 0a57fa0..faacb5f 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -3,7 +3,6 @@ files: "./files" thumbnails: "./thumbnails" generateThumbnails: true db: "./db.sqlite3" -dbTableName: "files" adminEnabled: true adminApiKey: "asd" fileameLength: 3 @@ -18,7 +17,6 @@ torExitNodesFile: "./torexitnodes.txt" torMessage: "TOR IS BLOCKED!" # Set this to 0 to disable rate limiting filesPerIP: 2 -ipTableName: "ips" rateLimitPeriod: 20 rateLimitMessage: "" # If you define the unix socket, it will only listen on the socket and not the port. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..199a1fb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +services: + file-uploader: + image: git.nadeko.net/fijxu/file-uploader-crystal:latest + # If you want to use a custom config file, you can mount it here. + volumes: + - ./config/config.yml:/file-uploader-crystal/config/config.yml + - ./files:/file-uploader-crystal/files + - ./thumbnails:/file-uploader-crystal/thumbnails + - ./db.sqlite3:/file-uploader-crystal/db.sqlite3 + ports: + - 127.0.0.1:8080:8080