Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support no Docker proxy by env VIRTUAL_UPSTREAM#1477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ccpaging wants to merge1 commit intonginx-proxy:main
base:main
Choose a base branch
Loading
fromccpaging:master

Conversation

ccpaging
Copy link

If set env as below:

VIRTUAL_HOST=foo.example.comVIRTUAL_UPSTREAM=192.168.1.8:8080,192.168.1.9:80 down

The default.conf's upstream sections is:

upstream foo.example.com {    server 192.168.1.8:8080;    server 192.168.1.9:80 down;}

VIRTUAL_HOST and VIRTUAL_UPSTREAM can be used in nginx-proxy container or any other fake container.

VIRTUAL_HOST do not support multiple hosts.
VIRTUAL_UPSTREAM support multiple address and deli with comma ','.

acbox reacted with thumbs up emoji
@TimvdEijnden
Copy link

@jwilder@lemker@benchonaut Why isn't this being added?

This adds support to proxy containers usingnetwork: host

  homeassistant:    image: homeassistant/raspberrypi4-homeassistant:stable    container_name: home-assistant    restart: always    environment:      - PUID=1000      - PGID=1000      - TZ=Europe/Amsterdam      - VIRTUAL_HOST=hass.mydomain.com      - VIRTUAL_PORT=8123      - LETSENCRYPT_HOST=hass.mydomain.com      - LETSENCRYPT_EMAIL=email@mydomain.com    volumes:      - ./home-assistant:/config    ports:      - 8123:8123    network_mode: host    ```
prashker reacted with thumbs up emoji

@sausix
Copy link

I was just about to implement this and found it as open PR.

I'm also running the proxy onnetwork_mode: host to allow connections to all services on all interfaces.

Some container ports can also be mapped to host's127.0.0.1:8888 to avoid dynamic ip addresses problems.
And the proxy then can upstream to that local port without linking containers.

@ccpaging Great work. But indentation is messed up.

@guysoft
Copy link

guysoft commentedJan 19, 2022
edited
Loading

Any idea why Home Assistant needs --net=host?
I see it has to set the proxy allowed, but wont setting that in the configuration be enough?

@buchdagbuchdag added status/pr-needs-testsThis PR needs new or additional test(s) status/pr-needs-docsThis PR needs new or additional documentation type/featPR for a new feature scope/configurable-upstreamIssue or PR related to non dockerized / configurable upstream labelsDec 2, 2022
@prashker
Copy link

prashker commentedDec 29, 2022
edited
Loading

Any idea why Home Assistant needs --net=host? I see it has to set the proxy allowed, but wont setting that in the configuration be enough?

From HomeAssistant Docker page:

Home Assistant candiscover and automatically configurezeroconf/mDNS andUPnP devices on your network. In order for this to work you must create the container with --net=host.

So it does notneed it, and I am kind of getting desperate so I don't mind turning it off once my home is properly configured, but I do like the auto-discovery functionality.

For reference for anyone from the future:Traefik explains how it handles this scenario.

@buchdag
Copy link
Member

@TimvdEijnden@sausix@prashker we're working on makingnginx-proxy compatible with host networking on#2222, you feedback would be welcome if you're still running against this issue.

prashker and guysoft reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
scope/configurable-upstreamIssue or PR related to non dockerized / configurable upstreamstatus/pr-needs-docsThis PR needs new or additional documentationstatus/pr-needs-testsThis PR needs new or additional test(s)type/featPR for a new feature
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@ccpaging@TimvdEijnden@sausix@guysoft@prashker@buchdag

[8]ページ先頭

©2009-2025 Movatter.jp