42 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
06de81b61b refactor: allow custom nginx command to be set as an nginx property
This avoids adding a new environment variable in favor of a script that can be called both globally as well as on a per-app basis.
2025-06-30 03:29:43 -04:00
Jose Diaz-Gonzalez
4d7f779c28 feat: add support for various timeout-related functions to nginx, openresty and k3s plugins
Closes #7267
2024-10-16 00:51:01 -04:00
Jose Diaz-Gonzalez
e70169f591 feat: allow setting most nginx properties globally
Closes #7151
2024-09-23 04:02:44 -04:00
Jose Diaz-Gonzalez
b99c25f090 feat: add support for setting underscores-in-headers for nginx, openresty, and k3s
Closes #6627
2024-02-27 13:49:44 -05:00
Jose Diaz-Gonzalez
f84a650849 chore: remove deprecated nginx commands 2023-02-12 13:20:45 -05:00
Jose Diaz-Gonzalez
ca4be83e64 fix: allow nginx-conf-sigil-path to be set globally 2022-12-18 17:49:55 -05:00
Jose Diaz-Gonzalez
17814d4847 refactor: only extract the nginx.conf.sigil from the source code and not an app path
The previous method was a bit more difficult for users to interact with as they needed to ensure the file was at a certain path in the built image. This change divorces the file from the built artifact, better aligning the nginx.conf.sigil handling with the rest of Dokku's monorepo support.

A side effect of this is now building proxy configurations does not require access to the built image.

Closes #5207
2022-11-23 19:32:53 -05:00
Jose Diaz-Gonzalez
98feb988fa feat: implement nginx:start and nginx:stop commands 2022-08-10 04:23:05 -04:00
Jose Diaz-Gonzalez
f7e218637e feat: add ability to specify X-Forwarded-Ssl header for proxied requests
Closes #4401
2021-02-20 00:03:25 -05:00
Jose Diaz-Gonzalez
5cac43fe55 refactor: fix computation test and remove the app-specific hsts value
The default for an app is empty, meaning it will fallback to the global value (which defaults to true). This will allow users to properly override the global value, regardless of what it is.
2021-01-23 15:49:40 -05:00
Jose Diaz-Gonzalez
277e9691e1 feat: add ability to set client max body size via nginx:set
This simplifies increasing upload size by making it a property, and is backwards compatible with installations that have set that in a custom file.
2021-01-21 01:41:34 -05:00
Bjorn Post
a6062d4ab4 feat: make feature more generic, also add support for setting -port and -proto values via nginx:set, refs #4339 2021-01-19 21:40:47 +01:00
Jose Diaz-Gonzalez
fd162f8895 feat: add verify_app_name calls to all shell subcommands
Without this, folks could potentially run commands against invalid applications.
2020-12-27 15:14:11 -05:00
Andrew Kane
c0581a0e37 feat: add ability to change the access log format 2020-11-30 21:59:36 -08:00
Yihao
30414cbd0c feat: Allow controlling nginx proxy-buffer-size, proxy-buffering, proxy-buffers, proxy-busy-buffers-size 2020-09-19 09:51:55 +09:30
Jose Diaz-Gonzalez
f5ba843cf3 feat: add ability to disable custom ninx.conf.sigil extraction
Closes #4087
2020-09-04 11:29:23 -04:00
Jose Diaz-Gonzalez
42122a7540 feat: allow controlling proxy-read-timeout
Closes #4042
2020-07-01 19:08:15 -04:00
Jose Diaz-Gonzalez
eaf0d9af55 feat: create proxy:build-config command
Closes #4024
2020-06-29 20:51:12 -04:00
Jose Diaz-Gonzalez
62caa85423 feat: add ability to change or disable the access/error log path
Closes #3911
2020-04-01 12:21:52 -04:00
Jose Diaz-Gonzalez
054bf26b0e chore: remove unnecessary source/import statements 2020-02-28 06:03:53 -05:00
Jose Diaz-Gonzalez
6fd4b5adb1 refactor: rewrite proxy plugin in golang 2020-02-22 06:40:24 -05:00
Jose Diaz-Gonzalez
94357b961e refactor: deprecate nginx:validate
The command function move was to fix circular import issues...
2020-02-19 01:00:47 -05:00
Jose Diaz-Gonzalez
579d430303 refactor: rename nginx:show-conf to nginx:show-config 2020-02-19 01:00:47 -05:00
Jose Diaz-Gonzalez
e67b96780d refactor: unify command declaration across codebase 2020-02-10 01:40:30 -05:00
Jose Diaz-Gonzalez
ef7894fdfa refactor: standardize help generation 2020-02-10 00:37:00 -05:00
Jose Diaz-Gonzalez
1cb586b2e7 refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
2020-02-09 22:41:39 -05:00
Jose Diaz-Gonzalez
73e7ff7b18 feat: Enable HSTS by default
This enables the HSTS header by default when an SSL certificate is in use. HSTS options can also be managed via the nginx:set command, which also exposes the ability to disable HSTS for your application.
2020-02-06 11:08:13 -05:00
Jose Diaz-Gonzalez
9937068d41 fix: reference correct file in nginx:report command
Closes #3827
2020-01-24 17:15:28 -05:00
Jose Diaz-Gonzalez
6b431378a1 feat: add ability to set the ipv4/ipv6 bind address for an app
This allows users to handle mulitple interfaces separately or even ensure applications remain accessible only on a local network.

Closes #3805
2019-12-21 18:54:54 -05:00
Jose Diaz-Gonzalez
38a58a17e4 chore: drop unused import 2019-12-19 02:29:22 -05:00
Jose Diaz-Gonzalez
90681ce475 docs: document nginx:show-conf 2019-12-19 02:24:27 -05:00
Jose Diaz-Gonzalez
68fcd67327 feat: Add nginx:show-conf command
Closes #3552
2019-05-14 18:03:16 -04:00
Jose Diaz-Gonzalez
86795ddacc tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
2019-01-07 01:25:55 -05:00
Jose Diaz-Gonzalez
0909052816 feat: Pull invalid nginx configuration when the nginx configs fail to validate
- expose an nginx:validate command that can be used to show validation information
- properly reference the invalid nginx config, rather than tell the user that another app's nginx config is invalid when deploying their own app
- allow a user to cleanup bad nginx config files out of band when they are blocking a deploy _without_ requiring knowing where that nginx config is

Note that this may have issues with generated nginx.conf files that depend on other apps or other parts of the nginx config. For now, this is acceptable, though it is something that needs to be field tested.

Closes #3162
2018-12-31 11:57:03 -05:00
Jose Diaz-Gonzalez
aee88d081d fix: add missing proxy/functions source call 2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
1835b04809 feat: refactor to use network plugin
- Add proxy-build-config hook to rebuild network and proxy settings for an application
- Scope nginx:build-config to work only when it is the configured proxy for an application
- Refactor deploy code to interact with network plugin for computed and actual ipaddr/port settings
- Ensure the proxy-build-config plugin trigger is called on ps:restore
- Expose a few plugin triggers for retrieving networking information for a given APP/PROC_TYPE/CONTAINER_ID combination
2017-10-02 15:05:13 -07:00
Jose Diaz-Gonzalez
2bcad2014b chore: unify error output when an app is not declared 2017-03-12 21:26:19 -06:00
Jose Diaz-Gonzalez
7bbad9f074 fix: ensure the help output for nginx/ssh-keys renders correctly
Closes #2627

[ci skip]
2017-03-12 21:24:43 -06:00
Jose Diaz-Gonzalez
ec2e2bc4cc refactor: alias nginx:default to nginx:help 2017-02-20 22:39:53 -07:00
Omar Shehata
810ba72879 Added nginx default help function 2016-11-28 03:03:30 +00:00
Michael Hobbs
987c5cfb9c use declare for description variable 2016-03-08 15:30:34 -05:00
Michael S. Hobbs
89f289b433 subcommand restructure and bashstyle refactor. closes #1579 2016-03-03 22:11:35 -08:00