Commit Graph

129 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
ca1ab188fe chore: drop SPDY
This hasn't been supported by browsers in quite a while and nginx will set a warning as of Ubuntu 20.04 when the header is referenced.
2022-12-29 01:59:54 -05:00
Jose Diaz-Gonzalez
edd6e476b3 refactor: simplify how url generation works
The URLS file is no longer necessary as urls are now generated directly from the app VHOST file.

This also moves all the url generation logic to the domains plugin.
2022-12-02 02:19:59 -05:00
Jose Diaz-Gonzalez
67c243b0ba fix: keep track of case where current deployment does not have a custom nginx.conf.sigil 2022-11-24 00:51:58 -05:00
Jose Diaz-Gonzalez
e3fa0c4bc4 refactor: move nginx.conf.sigil files into app-specific directories 2022-11-23 20:16:28 -05:00
Jose Diaz-Gonzalez
140c1e4d4c feat: scope the custom config to the current DOKKU_PID 2022-11-23 19:43:29 -05:00
Jose Diaz-Gonzalez
b166db90e6 fix: do not reuse app-specific nginx.conf.sigil globally 2022-11-23 19:41:56 -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
4ef260f57a fix: ignore https mappings when no ssl certificate exists
This fixes issues where users may somehow add an https mapping but are missing an ssl certificate, causing nginx to not load properly. We now ignore the mapping and warn users of the misconfiguration.

Closes #5368
2022-10-22 17:47:54 -04:00
Jose Diaz-Gonzalez
b605de522c refactor: split out proxy port configuration into it's own trigger
This will allow it to be called by plugins other than the nginx-vhosts one.
2022-08-10 04:23:05 -04:00
Jose Diaz-Gonzalez
268c318bc5 fix: ensure we do not filter apps for certain commands and triggers
Some things must pull *all* apps vs filtered apps (mostly things that write out config files or install triggers). Using an unflitered list is best.

Also, we default to filtering, which should be what most usage needs.
2022-05-15 15:47:13 -04:00
Femi Omojola
c75fe998e2 shfmt fixes 2021-12-31 00:48:47 -05:00
fomojola
55d8e2db81 Formatting fixes 2021-12-30 22:56:47 -05:00
fomojola
c209787de8 Conditionally restart NGINX
Before restarting nginx, check if the current app is using a proxy and if the selected proxy is in fact NGINX. Only then should we bother invoking the nginx reload.

Fixes https://github.com/dokku/dokku/issues/4987
2021-12-30 22:49:57 -05:00
Jose Diaz-Gonzalez
c045b1ca6b chore: capitalize certain log messages for aesthetic reasons 2021-09-05 00:36:58 -04:00
Jose Diaz-Gonzalez
a1c768b9b3 refactor: drop web installer in favor of setup via cli
This makes the installation a bit more secure by ensuring a user does not accidentally expose a way for unauthorized users to add new ssh keys to the system.

Additionally, this removes the extra HOSTNAME file to make the initial install process easier (that file was not modifiable by any dokku commands.

Closes #2247
2021-08-07 16:36:41 -04:00
Jose Diaz-Gonzalez
9ecfa843f0 feat: add support for routing an app to a specified host:port
This is useful when there is a service not managed by Dokku but should be exposed via the Dokku routing layer. As an example, some binaries (consul, nomad, vault) expose web uis, and are traditionally run on the host directly vs in a container.

Closes #4665
2021-08-06 01:29:25 -04:00
Jose Diaz-Gonzalez
8fc0cb67ec chore: drop unnecessary line stripping
Since this comes out of ps-current-scale, we can ensure the contents are always valid.
2021-08-01 16:33:42 -04:00
Jose Diaz-Gonzalez
550a0bd07b fix: properly parse input from ps-current-scale 2021-08-01 01:53:46 -04:00
Jose Diaz-Gonzalez
213f7d224c refactor: use ps-current-scale instead of parsing DOKKU_SCALE file when iterating over deployed processes 2021-08-01 01:43:35 -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
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
Bjorn Post
7cd6f7666c feat: configure trust x-forwarded-for headers via nginx:set iso trust by default, refs #4339 2021-01-18 21:09:00 +01:00
Jose Diaz-Gonzalez
90c68ba02f fix: correct position of app name check for nginx:validate-config 2020-12-29 02:46:18 -05:00
Jose Diaz-Gonzalez
08fdfd1e38 feat: drop internal calls to verify_app_name 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
Jose Diaz-Gonzalez
1b4559c4a4 chore: drop unused ps import 2020-11-21 20:57:33 -05: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
becf7c1f86 feat: allow customizing the various nginx templates
This will let custom distributions of Dokku to override the internal templates without needing to repackage Dokku or overwrite core files.
2020-09-06 13:57:35 -04:00
Jose Diaz-Gonzalez
f5ba843cf3 feat: add ability to disable custom ninx.conf.sigil extraction
Closes #4087
2020-09-04 11:29:23 -04:00
Hugo Peixoto
2160a8b64e Use *_PATH consistently
GLOBAL_VHOST_PATH and GLOBAL_VHOST_FILE were used to represent the same
thing. Same for APP_URLS_PATH and APP_VHOST_PATH.

This normalizes all of those to _PATH.
2020-07-16 05:40:56 +01:00
Roland van Laar
5f312d7347 Make make test pass on linting 2020-07-04 00:08:44 +02:00
Jose Diaz-Gonzalez
42122a7540 feat: allow controlling proxy-read-timeout
Closes #4042
2020-07-01 19:08:15 -04:00
Jose Diaz-Gonzalez
61a306664f refactor: move domain manipulation into triggers
This allows other plugins to avoid understanding the underlying details of how domains might be integrated with.
2020-05-06 00:16:51 -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
38a13ecd39 feat: expose network listeners to nginx templates for all process types
This change allows users to specify a custom nginx.conf.sigil that can expose non-web process types to the outside world in addition to the web process type.

Closes #3258
2020-03-11 12:34:38 -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
e19b52442b fix: remove deprecated egrep calls from codebase 2020-02-17 05:59:52 -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
lalyos
bb176e4130 feat: add global fallback for DOKKU_PROXY_PORT and DOKKU_PROXY_SSL_PORT 2020-02-03 13:22:09 -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
Kazuhiro NISHIYAMA
2a747138af Fix typo in desc of is_tls13_available
[ci skip]
2019-10-31 17:08:56 +09:00
Jose Diaz-Gonzalez
9dae004651 fix: require nginx 1.13+ in order to enable tls1.3
Closes #3711
2019-10-14 11:47:43 -04:00
Jose Diaz-Gonzalez
844b86840a Merge branch 'upcoming' of github.com:dokku/dokku into upcoming 2019-10-07 18:55:29 -05:00
Jose Diaz-Gonzalez
4d1beedd05 fix: do not create nginx.conf if the image for the app does not exist 2019-10-07 12:18:54 -04:00
Jose Diaz-Gonzalez
903d7ce614 chore: silence trigger logging
Logging that a trigger is about to be performed is a bit... extra. If folks want to know that a trigger is running, they can check the event logs.
2019-09-17 23:47:30 -04:00
Jose Diaz-Gonzalez
6e3fddb544 feat: add proper openresty support
This change allows supporting the openresty package as installed on Ubuntu 18.04 from the official openresty package repository, while also returning general nginx support.

Closes #3675
2019-09-16 03:05:35 -04:00
fzerorubigd
c4838b4af9 add test for grpc on a port other than 80
fix docs a bout supporting only HTTP
remove extra spaces
2019-08-24 10:58:34 +02:00