Skip to content

Latest commit

 

History

History
executable file
·
53 lines (40 loc) · 1.48 KB

README.md

File metadata and controls

executable file
·
53 lines (40 loc) · 1.48 KB

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