From 914f695eab584c5a927627880346dfc7e3a459ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Justen=20=28=40turicas=29?= Date: Wed, 27 May 2020 16:29:33 -0300 Subject: [PATCH 1/2] Fix doc about custom nginx config for Dockerfile --- docs/configuration/nginx.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration/nginx.md b/docs/configuration/nginx.md index 9bd4f6df6..6394d764f 100644 --- a/docs/configuration/nginx.md +++ b/docs/configuration/nginx.md @@ -155,8 +155,8 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider - Copy the following example template to a file named `nginx.conf.sigil` and either: - If using a buildpack application, you __must__ check it into the root of your app repo. - - `ADD` it to your dockerfile `WORKDIR` - - if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder + - If using Dockerfile deployment, set `WORKDIR` and `ADD` the file to this + directory (example: `WORKDIR /app` and `ADD nginx.conf.sigil /app`). > When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`. @@ -204,7 +204,7 @@ The example above uses additional configuration files directly on the Dokku host For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config *within* the container. The following are example contents for your `Procfile` web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/ - + Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - would also need to be configured as shown in this example: client_max_body_size 50m; From 1452e88248bed3381c4a86dee5e90182e3b42825 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 1 Aug 2020 20:38:37 -0400 Subject: [PATCH 2/2] docs: further clarify how we handle image copies [ci skip] --- docs/configuration/nginx.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/configuration/nginx.md b/docs/configuration/nginx.md index 6394d764f..fcd85de2f 100644 --- a/docs/configuration/nginx.md +++ b/docs/configuration/nginx.md @@ -155,8 +155,9 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider - Copy the following example template to a file named `nginx.conf.sigil` and either: - If using a buildpack application, you __must__ check it into the root of your app repo. - - If using Dockerfile deployment, set `WORKDIR` and `ADD` the file to this - directory (example: `WORKDIR /app` and `ADD nginx.conf.sigil /app`). + - If using a dockerfile or docker image for deploys, either: + - If WORKDIR is specified, add the file to the `WORKDIR` specified in the last Dockerfile stage (example: `WORKDIR /app` and `ADD nginx.conf.sigil /app`). + - If no WORKDIR is specified, add the file to the root (`/`) of the docker image (example:ADD nginx.conf.sigil /`). > When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.