So after writing my first post and then adding a nice "Coding" picture as the post banner, I went to change the photo for my main page. Ghost informed me that the file/image was over the size limit.

Now the irony is not lost on me that I have now changed theme (Coder is really nice) to one that doesn't have images for the posts or main page but for adding images *inside* posts I wanted to get rid of the file upload limit.

After a quick Google (well DuckDuckGo) it seems this is quite a common issue and it requires adding -

client_max_body_size 100m;

Now client_max_body_size is normally set to 1mb, for my purposes 100mb will be enough for my blog.

Now changing the config is easy but I wanted to be able to deploy this from scratch in the future with this change already in place. I needed to do 2 things -

  1. Update the docker-compose.yml file with your customization's and add the following line (under the nginx-proxy section)-
- "./my_custom_proxy_settings.conf:/etc/nginx/conf.d/my_custom_proxy_settings.conf"

So the file looks like so -

version: '2'

    image: ghost:latest
    restart: always
    NODE_ENV: production
    url: https://<Your Domain Here>
    mail__transport: SMTP
    mail__options__service: Mailgun
    mail__options__auth__user: <My Mailgun User>
    mail__options__auth__pass: <My Mailgun Password>
    VIRTUAL_HOST: <Your Domain Here>
    LETSENCRYPT_HOST: <Your Domain Here>
    LETSENCRYPT_EMAIL: <Your Email Here>
      - ~/data/ghost:/var/lib/ghost/content

    image: jwilder/nginx-proxy
      - "80:80"
      - "443:443"
      - "/etc/nginx/vhost.d"
      - "/usr/share/nginx/html"
      - "/var/run/docker.sock:/tmp/docker.sock:ro"
      - "/etc/nginx/certs"
      - "./my_custom_proxy_settings.conf:/etc/nginx/conf.d/my_custom_proxy_settings.conf"
    image: jrcs/letsencrypt-nginx-proxy-companion
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "nginx-proxy"

2. Create a file called my_custom_proxy_settings.conf and add the following -

client_max_body_size 100m;

Now all you have to do is create a folder on your server (I called my sslghost) and upload the 2 files in to that folder.

Once you have done that you can move in to that folder and run -

docker-compose up

You will see the screen fill up as docker does its thing, once it is settled you can Ctrl + C out and then run -

docker-compose up -d

Then the containers will now run in the background with no file size upload limit!