Picsur/README.md

177 lines
5.9 KiB
Markdown
Raw Permalink Normal View History

2022-09-02 12:49:53 +00:00
<img align="left" width="100" height="100" style="border-radius: 15%" src="branding/logo/picsur.svg"/>
2022-02-25 12:59:59 +00:00
2022-06-15 14:30:33 +00:00
<a href="https://discord.gg/GPZNwV3VKE">
<img align="right" style="margin: 5px" src="https://img.shields.io/discord/986634827337965638?color=454FBF&label=Chat%20on%20Discord"/>
</a>
2022-02-27 19:27:22 +00:00
# Picsur
2022-02-25 16:18:42 +00:00
2022-09-02 15:06:55 +00:00
> Totally not an Imgur clone
2022-02-25 12:56:16 +00:00
I couldn't really find any open source project that allowed you to easily host images. So I decided to create one.
2022-04-18 12:54:29 +00:00
It feels like a hybrid between Imgur and Pastebin.
2022-02-25 12:56:16 +00:00
## Beta
Right now this software is still in beta, and many things are still missing, or will be changed in the future.
But it does function, so feel free to give it a try.
2022-02-25 16:13:53 +00:00
## Demo
2022-09-14 09:50:39 +00:00
You can view a live demo here: <https://picsur.org/>
2022-02-25 16:13:53 +00:00
2022-04-18 12:54:29 +00:00
The images are deleted every five minutes, and the maximum filesize is 16MB. But it should give you an indication of how it works.
2022-02-25 16:13:53 +00:00
2022-06-05 10:30:13 +00:00
## Features
Here is a list of done features, and what is planned.
2023-02-23 11:19:07 +00:00
For a more detailed list, you can always visit [the project](https://github.com/CaramelFur/Picsur/projects/1).
2022-06-05 10:30:13 +00:00
2022-08-28 15:00:44 +00:00
Every featured marked here should work in the latest release.
2022-06-05 10:30:13 +00:00
2022-06-05 10:31:10 +00:00
- [x] Uploading and viewing images
- [x] Anonymous uploads
- [x] User accounts
- [x] User roles and permissions
- [x] Proper CORS restrictions
- [x] Exif stripping
- [x] Ability to keep original
2022-08-28 15:00:44 +00:00
- [x] Support for many formats
- QOI
- JPG
- PNG
- WEBP (animated supported)
- TIFF
- BMP
- GIF (animated supported)
2022-06-05 10:31:10 +00:00
- [x] Convert images
2022-08-28 15:00:44 +00:00
- [x] Edit images
- Resize
- Rotate
- Flip
- Strip transparency
- Negative
- Greyscale
2022-06-05 10:31:10 +00:00
- [x] Deletable images
2022-08-28 15:00:44 +00:00
- [x] Proper DB migrations
- [x] Show own images in list
2022-09-06 14:32:16 +00:00
- [x] Correct previews on chats
2022-12-25 21:35:04 +00:00
- [x] Expiring images
- [x] ShareX endpoint
2022-12-25 21:41:26 +00:00
- [x] ARM64 and AMD64 Docker image
2022-06-05 10:31:10 +00:00
- [ ] White mode
2022-09-11 14:38:03 +00:00
- [ ] Public gallery
2023-01-05 00:12:46 +00:00
- [ ] Albums
2022-06-05 10:30:13 +00:00
2022-02-25 16:18:42 +00:00
## Bugs
2023-02-23 11:19:07 +00:00
If you encounter any bugs or oddities, please open an issue [here](https://github.com/CaramelFur/Picsur/issues). Cause without feedback I'll never know they exists.
2022-02-25 16:18:42 +00:00
2022-04-18 12:54:29 +00:00
## Star
If you like this project, don't forget to give it a star. It tells me that I'm not wasting my time on something that people don't like.
2022-09-02 14:59:14 +00:00
## Faq
2022-12-28 09:39:47 +00:00
### Is this project maintained?
Yes it still is. If I were to stop maintaining it, I would archive the repository.
However I do not have a lot of time on my hands, so updates are not always as frequent as I would like them to be.
2022-09-02 14:59:14 +00:00
### Why do my images dissapear of the public instance?
The public instance is only a demo, and therefore only keeps images for 5 minutes. This is to prevent the server from running out of disk space, and to prevent people from using it to host questionable images.
If you wish to keep your images, you will have to host your own instance.
### How do I allow users to register their own accounts?
By default, users can't register their own accounts. This is to prevent users from accidentally allowing anyone to upload to their instance.
If you want to allow this you can though. To change this you go to `settings -> roles -> guest -> edit`, and then give the guest role the `Register` permission. Upon saving the role, the register button will appear on the login page.
### I want to keep my original image files, how?
By default, Picsur will not keep your original image files. Since for most purposes this is not needed, and it saves disk space.
If you want to enable this however, you can do so by going to `settings -> general`, and then enabling the `Keep original` option. Upon saving the settings, the original files will be kept.
Do keep in mind here, that the exif data will NOT be removed from the original image. So make sure you do not accidentally share sensitive data.
### This service says its supports the QOI format, what is this?
QOI is a new lossless image format that is designed to be very fast to encode and decode. All while still offering good compression ratios. This is the primary format the server will store images in when uploaded.
You can [read more about QOI here](https://qoiformat.org/).
2023-05-11 13:17:35 +00:00
### What is the default admin login?
The default username is `admin`, and the default password is set from the `PICSUR_ADMIN_PASSWORD` environment variable.
2022-09-02 14:59:14 +00:00
## Running your own instance
2022-02-25 12:56:16 +00:00
2022-02-25 16:13:53 +00:00
You easily run this service yourself via Docker. Here is an example docker-compose file:
```yaml
2022-06-05 10:20:16 +00:00
version: '3'
2022-02-25 16:13:53 +00:00
services:
2022-02-27 19:27:22 +00:00
picsur:
2023-02-23 11:19:07 +00:00
image: ghcr.io/caramelfur/picsur:latest
2022-02-27 19:27:22 +00:00
container_name: picsur
2022-02-25 16:13:53 +00:00
ports:
2022-06-05 10:20:16 +00:00
- '8080:8080'
2022-02-25 16:13:53 +00:00
environment:
2022-02-27 19:27:22 +00:00
# PICSUR_HOST: '0.0.0.0'
# PICSUR_PORT: 8080
2022-02-25 16:13:53 +00:00
2022-02-27 19:27:22 +00:00
PICSUR_DB_HOST: picsur_postgres
# PICSUR_DB_PORT: 5432
# PICSUR_DB_USERNAME: picsur
2022-02-27 19:27:22 +00:00
# PICSUR_DB_PASSWORD: picsur
# PICSUR_DB_DATABASE: picsur
2022-02-25 16:13:53 +00:00
2023-05-11 13:17:35 +00:00
## The default username is admin, this is not modifyable
2022-02-27 19:27:22 +00:00
# PICSUR_ADMIN_PASSWORD: picsur
2022-02-25 16:13:53 +00:00
2022-09-01 18:25:40 +00:00
## Optional, random secret will be generated if not set
2022-02-27 19:27:22 +00:00
# PICSUR_JWT_SECRET: CHANGE_ME
2022-09-01 18:25:40 +00:00
# PICSUR_JWT_EXPIRY: 7d
2022-02-25 16:13:53 +00:00
2022-09-01 18:25:40 +00:00
## Maximum accepted size for uploads in bytes
2022-02-27 19:27:22 +00:00
# PICSUR_MAX_FILE_SIZE: 128000000
2022-09-01 18:25:40 +00:00
## No need to touch this, unless you use a custom frontend
2022-02-27 19:27:22 +00:00
# PICSUR_STATIC_FRONTEND_ROOT: "/picsur/frontend/dist"
2022-09-01 18:25:40 +00:00
## Warning: Verbose mode might log sensitive data
# PICSUR_VERBOSE: "true"
2022-02-25 16:13:53 +00:00
restart: unless-stopped
2022-02-27 19:27:22 +00:00
picsur_postgres:
2022-08-28 15:00:44 +00:00
image: postgres:14-alpine
2022-02-27 19:27:22 +00:00
container_name: picsur_postgres
2022-02-25 16:13:53 +00:00
environment:
2022-02-27 19:27:22 +00:00
POSTGRES_DB: picsur
POSTGRES_PASSWORD: picsur
POSTGRES_USER: picsur
2022-02-25 16:13:53 +00:00
restart: unless-stopped
volumes:
2022-02-27 21:04:33 +00:00
- picsur-data:/var/lib/postgresql/data
2022-02-25 16:13:53 +00:00
volumes:
2022-02-27 21:04:33 +00:00
picsur-data:
2022-02-25 16:13:53 +00:00
```
2022-02-25 12:56:16 +00:00
2022-09-15 08:27:21 +00:00
## Thanks
2023-07-06 11:51:47 +00:00
- @chennin for monthly donating 4$
2022-09-15 08:27:21 +00:00
- @awg13 for donating 5$
2022-02-26 17:16:38 +00:00
## Api
Here is a usually up to date documentation of the api:
2023-04-20 17:44:27 +00:00
[![Run in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/caramel-team/workspace/picsur/collection/1841871-78e559b6-4f39-4092-87c3-92fa29547d03)
2022-09-02 15:06:55 +00:00
If you wish to build your own frontend or app for picsur, this will surely come in handy. Also take a look at the `./shared` folder in the source code, as it contains typescript schema definitions for the api.