Compare commits

..

No commits in common. "dd570f7f9347a64119c064f19786646961d7f543" and "fc80d9e661faa1c2a4dbf00a7b0624df8f290d37" have entirely different histories.

3 changed files with 1 additions and 47 deletions

View File

@ -1,7 +0,0 @@
FROM python:latest
ADD . /opt/imgs
RUN mkdir -p /opt/imgs/uploads
WORKDIR /opt/imgs
RUN pip install --upgrade pip && pip install --requirement requirements.txt
EXPOSE 5000
CMD gunicorn imgs:app --bind :5000

View File

@ -5,50 +5,12 @@ imgs is a minimalictic image sharing web app written with Bottle framework.
No database. No image compression. No time limits. No additional dependencies.
Features:
* Upload images via Drag&Drop
* Easy copy share link
* MIME type detecting
See deployment options in Bottle documentation: https://bottlepy.org/docs/dev/deployment.html
# Run imgs in Docker
Clone repository and edit **imgs.ini**.
Build Docker image:
```bash
docker build --tag imgs .
```
Run container from image. Replace **/path/to/your/uploads/dir** with path to directory where you want to store images:
```
sudo docker run --rm --name imgs --detach --publish 127.0.0.1:5000:5000 --volume /path/to/your/uploads/dir:/opt/imgs/uploads imgs
```
imgs will launched on `127.0.0.1:5000`. Set up reverse proxy server. I recommed to use basic authentication to prevent abuses. Nginx virtual host example:
```nginx
server {
listen 80;
server_name yourdomain.tld;
location / {
root /path/to/imgs/root;
auth_basic "Authentication required";
auth_basic_user_file /path/to/.htpasswd;
proxy_pass http://127.0.0.1:5000;
}
location ~* \..* {
auth_basic off;
proxy_pass http://127.0.0.1:5000;
}
}
```
# Additional
## imgs client with CLI
@ -63,4 +25,4 @@ sudo cp imgs /usr/bin/imgs
Push files to your imgs instance via GNOME Files (former name: Nautilus). Depends packages: curl, notyfy-send.
Just place **Upload to imgs** script into **~/.local/share/nautilus/scripts/** directory.
Just place **Upload to imgs** script into **~/.local/share/nautilus/scripts**.

View File

@ -1,2 +1 @@
bottle==0.12.19
gunicorn==20.1.0