Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 4a28190

Browse files
committed
- switch from Discord Lilliput to ImageMagick & FFmpeg
- add video thumbnails - make thumbnails permanent (should result in faster loading of thumbnails) - remove exif/metadata from images - make files more efficient (small amount of lossy compression to images, sorry, but Meower is a chat platform, so original quality isn't super important to most people)
1 parent b7e77e2 commit 4a28190

File tree

15 files changed

+527
-1502
lines changed

15 files changed

+527
-1502
lines changed

.env.example

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This is only an example. Please do not use this in a production environment!
2-
# Please copy this file to .env and change the values to your own settings.
2+
# Please copy this file to .env and change the values to suit your environment.
33

44
# Mongo database
55
MONGO_URI="mongodb://127.0.0.1:27017"
@@ -14,23 +14,17 @@ MINIO_ACCESS_KEY="minioadmin"
1414
MINIO_SECRET_KEY="minioadmin"
1515
MINIO_SECURE=0
1616

17-
# Primary status
18-
PRIMARY_NODE=1
17+
# Error logging
18+
SENTRY_DSN=""
19+
20+
# Ingest directory (used for storing temporary files)
21+
INGEST_DIR="./.ingest"
1922

2023
# Web server
2124
HTTP_PORT="3000"
2225

23-
# gRPC Uploads service
24-
GRPC_UPLOADS_ADDRESS="0.0.0.0:5001"
25-
GRPC_UPLOADS_TOKEN=
26-
2726
# File size limits
2827
MAX_ICON_SIZE_MIB=5
2928
MAX_EMOJI_SIZE_MIB=1
3029
MAX_STICKER_SIZE_MIB=1
3130
MAX_ATTACHMENT_SIZE_MIB=50
32-
33-
# Automatic CF cache purging
34-
CF_TOKEN=
35-
CF_ZONE_ID=
36-
CF_URL=

.ingest/.gitkeep

Whitespace-only changes.

Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ FROM golang AS builder
33
WORKDIR /app
44
COPY . .
55
RUN go mod download
6-
RUN go build -o /Meower-Uploads
6+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o Meower-Uploads
77

88
# Production stage
9-
FROM ubuntu:24.04
10-
WORKDIR /
11-
COPY --from=builder /Meower-Uploads /Meower-Uploads
12-
ENTRYPOINT ["/Meower-Uploads"]
9+
FROM alpine
10+
WORKDIR /app
11+
RUN apk add --no-cache coreutils file imagemagick ffmpeg
12+
COPY --from=builder /app/Meower-Uploads /app/Meower-Uploads
13+
ENTRYPOINT ["/app/Meower-Uploads"]

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Meower Uploads
2+
Meower Uploads is designed to be a high-performance files service for Meower.
3+
4+
Public instance hosted at: https://uploads.meower.org
5+
6+
7+
### System Requirements
8+
Meower Uploads can use a fair amount of CPU and RAM. We recommend using a fairly modern CPU, with at least 4 threads and 4GB of dedicated RAM.
9+
10+
Meower Uploads has only been tested on GNU/Linux. Meower Uploads uses utilities found in the [GNU core utilities](https://www.gnu.org/software/coreutils).
11+
12+
Meower Uploads also requires [ImageMagick](https://imagemagick.org) and [FFmpeg](https://ffmpeg.org) to be installed and accessible.
13+
14+
No special codecs are required to be installed for Meower Uploads at this time, but this may change in the future.
15+
16+
17+
### Integration
18+
To integrate Meower Uploads with your existing Meower deployment, simply configure it to connect to your MongoDB database.

0 commit comments

Comments
 (0)