1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00

1200 Commits

Author SHA1 Message Date
Richard Hansen
11a46f728c chore: Factor out container IP:port lookup
This will make planned future changes easier.
2023-02-01 03:06:39 -05:00
Richard Hansen
2494e20784 chore: Remove support for legacy swarm
It doesn't work with the newer Docker Swarm mode so it doesn't have
much value anymore.
2023-02-01 03:04:37 -05:00
Nicolas Duchon
1462ff019d
Merge pull request #1179 from harvdogg/master
Allow complete override of location blocks
2023-02-01 07:42:42 +01:00
Richard Hansen
2115974e93 feat: Add ability to completely override location blocks
Co-authored-by: Trent Harvey <trent@harvdog.net>
2023-01-31 04:53:12 -05:00
Nicolas Duchon
8ac8b021b8
Merge pull request #2155 from rhansen/docker-pull
chore: Pass `--pull` to `docker build` to get fresh images
2023-01-30 07:57:44 +01:00
Nicolas Duchon
926bd43cff
Merge pull request #2153 from rhansen/upstream-cleanup
fix: Generate at most one `server` directive per container
2023-01-30 07:56:50 +01:00
Richard Hansen
912a065406 chore: Pass --pull to docker build to get fresh images
This is a no-op if the images are already up to date, and it prevents
puzzling problems when the images are old.
2023-01-28 18:17:40 -05:00
Richard Hansen
6162427c45 fix: Generate at most one server directive per container 2023-01-28 18:01:19 -05:00
Richard Hansen
bcec2d9075 chore: Refactor upstream template for readability
In particular, reduce the nesting depth to make it easier to
understand what the code is doing by:

  * converting an $O(nm)$ nested loop into two serial $O(n)+O(m)$
    loops, and
  * consolidating similar nested `if` cases.
2023-01-28 18:01:19 -05:00
Richard Hansen
daeed502cb feat: Add a warning comment if the container port is published 2023-01-28 18:01:19 -05:00
Richard Hansen
5a8a6ceae2 chore: Improve debug comments in upstream template 2023-01-28 18:01:19 -05:00
Richard Hansen
2760ead490 chore: Remove warning comment when port is not exposed
Exposing ports is largely deprecated because it doesn't actually do
anything in Docker.
2023-01-28 18:01:19 -05:00
Richard Hansen
e97bf606c8 chore: Move version comment to the top of the template
to ensure that the version is always the first output line.

Also, always output `# nginx-proxy`, even if the version isn't known.
This makes it easier to find the start of the generated config in the
output of `nginx -T`.
2023-01-28 18:01:19 -05:00
Richard Hansen
d6d53893e8
Merge pull request #2152 from vincent-herlemont/documentation-log-format
Documentation custom log format.
2023-01-28 03:32:21 -05:00
Vincent Herlemont
aa50116272 Documentation custom log format. 2023-01-27 23:16:49 +01:00
Vincent Herlemont
07cc80ac6b
feat: Support LOG_FORMAT env variable (#2151) 2023-01-27 12:28:40 -05:00
Richard Hansen
8346b68a28 fix: Ignore VIRTUAL_HOST set to the empty string
Fixes #2144
2023-01-23 20:48:16 -05:00
Richard Hansen
f8ae0a4b00 feat: DEFAULT_ROOT=none disables the default location / block 2023-01-23 20:47:00 -05:00
Nicolas Duchon
d3ded293ac
Merge pull request #2147 from nginx-proxy/dockergen-0.9.4
build: dockergen 0.9.3 -> 0.9.4
2023-01-24 00:27:54 +01:00
Nicolas Duchon
fa52426d54
ci: set Dependabot commit prefixs 2023-01-23 23:24:58 +01:00
Nicolas Duchon
8df67cdde8
build: dockergen 0.9.3 -> 0.9.4 2023-01-23 23:14:42 +01:00
Richard Hansen
98b6473c84
Merge pull request #2141 from rhansen/debug
feat: Unconditionally produce debug comments
2023-01-21 19:02:27 -05:00
Richard Hansen
8fbc8514ef feat: Unconditionally produce debug comments
Rationale for eliminating the check to see if the `DEBUG` environment
variable holds a true value:
  * The `DEBUG` environment variable might be set on a container (for
    purposes specific to that container, not `nginx-proxy`) to a value
    that cannot be parsed as a bool, which would break `nginx-proxy`.
  * It simplifies the template.
  * It eliminates a cold code path.
  * It avoids heisenbugs.
  * It makes debugging easier for users.

Also delete the debug info tests, as they are fragile and they provide
limited value.

Alternatively, we could avoid collision with the container's use of
the `DEBUG` environment variable by using a container label [1] such
as `com.google.nginx-proxy.nginx-proxy.debug`.  I think doing so has
dubious value, especially if we want to attempt backwards
compatibility with the `DEBUG` environment variable.

Fixes #2139

[1] https://docs.docker.com/engine/reference/commandline/run/#-set-metadata-on-container--l---label---label-file

Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
2023-01-18 17:27:04 -05:00
Nicolas Duchon
1775420592
Merge pull request #2140 from rhansen/tests
Minor test fixes
2023-01-18 08:02:02 +01:00
Richard Hansen
92e1a6567e tests: Remove extraction of nginx.tmpl (now unnecessary) 2023-01-17 18:02:30 -05:00
Richard Hansen
486addd144 tests: Bind-mount the entire nginx-proxy directory in the container 2023-01-17 18:02:30 -05:00
Richard Hansen
569953521a tests: Exit non-zero if creation of nginx-proxy-tester image fails 2023-01-17 18:02:30 -05:00
Richard Hansen
55cfae9636 tests: Avoid unnecessary bashisms 2023-01-17 18:02:30 -05:00
Richard Hansen
d56b5b370d tests: Whitespace fixes 2023-01-17 18:02:30 -05:00
Richard Hansen
26b0b05f73 tests: Fix test_debug/* tests when IPv6 is enabled 2023-01-17 18:02:29 -05:00
Nicolas Duchon
5d22134ee6
Merge pull request #2137 from nginx-proxy/dockergen-0.9.3
build: dockergen 0.9.2 -> 0.9.3
2023-01-17 08:35:18 +01:00
Nicolas Duchon
b16ad27878
build: dockergen 0.9.2 -> 0.9.3 2023-01-17 08:17:02 +01:00
Nicolas Duchon
017a731302
Merge pull request #2127 from rhansen/chores
Various code health chores
2023-01-17 07:44:57 +01:00
Richard Hansen
2427b383b5 chore: Move global variables to a $globals dict
Planned future changes will introduce more embedded templates, and the ability
to pass the globals to the templates will be useful.
2023-01-17 00:42:20 -05:00
Richard Hansen
1b253cd908 chore: Wrap long comments 2023-01-17 00:42:20 -05:00
Richard Hansen
0da38122bd chore: Consistent indentation 2023-01-17 00:42:20 -05:00
Richard Hansen
f20662eeaa chore: Use {{- instead of {{ to clean up whitespace 2023-01-17 00:42:20 -05:00
Richard Hansen
d6d8b2205f chore: Fix comment terminators 2023-01-17 00:42:20 -05:00
Richard Hansen
4651bf411d chore: Fix comment for $proxy_connection variable 2023-01-17 00:42:20 -05:00
Richard Hansen
744bd82c54 chore: Combine identical HTTP and HTTPS servers 2023-01-17 00:42:20 -05:00
Richard Hansen
491642b1e9 chore: Factor out duplicate virtual path code 2023-01-17 00:42:20 -05:00
Richard Hansen
14d0f3f222 chore: Rename $container to $containers
The value is actually a slice/array of containers so it should be
pluralized.
2023-01-17 00:42:20 -05:00
Richard Hansen
05423c681a fix: Use parseBool to parse boolean strings 2023-01-17 00:42:20 -05:00
Richard Hansen
c117ae8fd8 chore: Use boolean for $server_found variable 2023-01-17 00:42:20 -05:00
Richard Hansen
05eee4b7a3
Merge pull request #2136 from nginx-proxy/dependabot/pip/test/requirements/pytest-7.2.1
chore(deps): bump pytest from 7.2.0 to 7.2.1 in /test/requirements
2023-01-16 23:28:47 -05:00
dependabot[bot]
9c9545bf7f
chore(deps): bump pytest from 7.2.0 to 7.2.1 in /test/requirements
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.0...7.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 04:12:49 +00:00
Richard Hansen
cc9edec1c6
Merge pull request #2134 from nginx-proxy/dependabot/pip/test/requirements/requests-2.28.2
chore(deps): bump requests from 2.28.1 to 2.28.2 in /test/requirements
2023-01-13 16:35:16 -05:00
dependabot[bot]
831615fdd4
chore(deps): bump requests from 2.28.1 to 2.28.2 in /test/requirements
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.28.2.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.28.2)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 04:04:20 +00:00
Richard Hansen
3531fa4d37
Merge pull request #2132 from nginx-proxy/dependabot/docker/golang-1.19.5
chore(deps): bump golang from 1.19.4 to 1.19.5
2023-01-11 14:10:23 -05:00
dependabot[bot]
146b7933a9
chore(deps): bump golang from 1.19.4 to 1.19.5
Bumps golang from 1.19.4 to 1.19.5.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-11 04:03:07 +00:00