nginx - add possibility to have custom nginx configuration
Hello,
previously we introduced a new webserver.preset variable (issue #56 (closed)), so we can choose one of wodby/nginx presets, and that works great. But sometimes it's not enough, and we have to add/change some nginx config.
wodby/nginx already offers a custom preset option: https://github.com/wodby/nginx#custom-preset
Draft MR is here: !73 (diffs)
My idea is: when webserver.preset variable is set to 'custom' -> empty files nginx/custom.conf and nginx/upstream.custom.conf are created in the project, so we can easily add/copy templates from wodby/nginx https://github.com/wodby/nginx/tree/master/templates. Also, when webserver.preset variable is set to 'custom' - those custom files are mounted as volumes into nginx service.
That works perfectly locally, but the problem is that custom nginx configuration files (nginx/custom.conf and nginx/upstream.custom.conf) are getting deleted from the codebase on the build.
Any tip on how we can prevent it.. or on how we can extend lakedrops/docker4drupal to make it possible...? I was looking over existing stuff in lakedrops/docker4drupal, and cannot see a similar functionality. Most close are tests/cypress/cypress.config.js, tests/cypress/support/commands.js, and tests/cypress/support/e2e.js files, and they are used for tests. but they are still deleted in the final build/codebase.
Thank you!