Skip to content

bxue1037/yet-another-image-bed

 
 

Repository files navigation

A image bed is ready for my blog, which supports https.

Acknowledgements

Aim

Letsencrypt provides SSL/TLP certificate to support https.

Deploy

  1. $ git clone https://github.com/leollon/yet-another-image-bed.git imgbed-project

  2. $ sudo bash onekey-deploy.sh

  3. paste this configuration to your nginx vhost in the server block.

    Note: modify username to your username, then ctrl+c and ctrl+v, yeah.

    location / {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_redirect off;
            proxy_buffering off;
            proxy_pass http://127.0.0.1:5050;
        }
    
        location ^~ /static/ {
            alias /home/username/imgbed-project/static_files/;
        }
    
        location ~* \.(jpg|jpeg|png|gif|svg) {
            # serving uploaded images
            root /home/username/imgbed-project/uploaded_images;
        }
    

ToDO

  • upload/remove an image
  • deploy with docker compose

Modifications based on your needs

  • config.py

    set mongoengine connection, the max size of each uploaded image and so on.

  • compose/production/mongodb/createUser.js

    set user and password for imgbed document

License

GNU LV3

About

Yet another image bed to support https with letsencrypt.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 33.7%
  • HTML 32.6%
  • JavaScript 12.5%
  • CSS 8.3%
  • Dockerfile 6.6%
  • Shell 6.3%