Repository navigation
Add relay and discovery Dockerfiles - #6143
Conversation
calmh
left a comment
There was a problem hiding this comment.
Does the discosrv require host networking? It depends on being able to see the source address of the announcing device and I’d expect the Docker proxy obscures this
Based on my testing: no, host networking isn't required. However, I have the discovery server behind an Ingress router (ingress-nginx) with the following annotations: I also had to add the other misc relay/disco ports (22000, 22067, 22070, 19200) to the |
|
Right, so the discovery server picks up x-forwarded-for and makes this work, but I don't think that will be the case in general when someone tries to deploy this, so it requires notes or some workaround I think. |
|
Can you provide more details about the deployment scenario you'd like me to test / document? I ran the discovery container in docker (no kubernetes), pointed a few clients to it and I think it's working as expected. I ran the following on a server: And then pointed some clients to: However, in ^this config I am getting some Were you thinking about a deployment scenario that is kubernetes / no ingress router? |
|
Can you hit it from a remote machine with no k8s?
|
Yes, I was hitting it from remote machines. Upon further inspection I think this was the Docker healthcheck: |
|
I think that's fine, but what I care whether remote IP address reported by the network stack is actually remote. It seems it is never in the logs, so you either need to modify the source code to add printing of it, or run stdiscosrv against postgres and check what gets recorded in the db. |
|
I built a new discovery container with this quick-and-dirty patch: The remote IP address looks fine (I think): Should I add additional debugging elsewhere to double check this remote IP? |
|
No, this looks good. I am happy with this. I'll leave for @calmh to merge given we've answered the question. |
* master: docker: Add stdiscosrv and strelaysrv Dockerfiles (syncthing#6143) lib/protocol: Buffer allocation when compressing (fixes syncthing#6146) (syncthing#6147) golang-ci: Upgrade, skipping the white space complainer all: Cleanups enabled by Go 1.12 lib/tlsutil: Remove Go 1.12 TLS 1.3 beta opt-in lib/api: Make theme paths relative (syncthing#6142) gui, lib/api: Adds support for prefers-color-scheme (fixes syncthing#6115) lib/api: Reset mtime after theme change (fixes syncthing#5810) (syncthing#6140) lib/model: Remove some testing deadlocks (syncthing#6138) lib/model: Add test for previous commit lib/model: Add initial deviceStatRefs on model creation (fixes syncthing#6136) (syncthing#6137) lib/model: Add folders on start in model (syncthing#6135) cmd/stbench: rm -r cmd/stbench (syncthing#6131) lib/api: Slightly unflake TestCSRFRequired by allowing longer timeout Fix bufferpool puts (ref syncthing#4976) (syncthing#6125) all: Remove dead code, fix lost msgLen checks (syncthing#6129) lib/upnp: Fix outdated comment (syncthing#6110)
* dbastr3: (37 commits) docker: Add stdiscosrv and strelaysrv Dockerfiles (syncthing#6143) lib/protocol: Buffer allocation when compressing (fixes syncthing#6146) (syncthing#6147) golang-ci: Upgrade, skipping the white space complainer all: Cleanups enabled by Go 1.12 lib/tlsutil: Remove Go 1.12 TLS 1.3 beta opt-in lib/api: Make theme paths relative (syncthing#6142) gui, lib/api: Adds support for prefers-color-scheme (fixes syncthing#6115) lib/api: Reset mtime after theme change (fixes syncthing#5810) (syncthing#6140) lib/model: Remove some testing deadlocks (syncthing#6138) lib/model: Add test for previous commit lib/model: Add initial deviceStatRefs on model creation (fixes syncthing#6136) (syncthing#6137) lib/model: Add folders on start in model (syncthing#6135) wip wip wip wip cmd/stbench: rm -r cmd/stbench (syncthing#6131) lib/api: Slightly unflake TestCSRFRequired by allowing longer timeout Fix bufferpool puts (ref syncthing#4976) (syncthing#6125) wip ...
* master: golang-ci: Skip "cognitive complexity" check for now lib/model: Prevent cleanup-race in testing (ref syncthing#6152) (syncthing#6155) gui: Decrease padding on the panel and modal bodies (syncthing#6153) lib/model: In tests prevent goroutine leaks and increase timeouts (syncthing#6152) lib/model: Simplify pull error/retry logic (fixes syncthing#6139) (syncthing#6141) docker: Add stdiscosrv and strelaysrv Dockerfiles (syncthing#6143) lib/protocol: Buffer allocation when compressing (fixes syncthing#6146) (syncthing#6147) golang-ci: Upgrade, skipping the white space complainer all: Cleanups enabled by Go 1.12 lib/tlsutil: Remove Go 1.12 TLS 1.3 beta opt-in lib/api: Make theme paths relative (syncthing#6142) gui, lib/api: Adds support for prefers-color-scheme (fixes syncthing#6115) lib/api: Reset mtime after theme change (fixes syncthing#5810) (syncthing#6140) lib/model: Remove some testing deadlocks (syncthing#6138) lib/model: Add test for previous commit lib/model: Add initial deviceStatRefs on model creation (fixes syncthing#6136) (syncthing#6137) lib/model: Add folders on start in model (syncthing#6135)
…nto logsuppression * 'logsuppression' of https://github.com/calmh/syncthing: wip golang-ci: Skip "cognitive complexity" check for now lib/model: Prevent cleanup-race in testing (ref syncthing#6152) (syncthing#6155) gui: Decrease padding on the panel and modal bodies (syncthing#6153) lib/model: In tests prevent goroutine leaks and increase timeouts (syncthing#6152) lib/model: Simplify pull error/retry logic (fixes syncthing#6139) (syncthing#6141) docker: Add stdiscosrv and strelaysrv Dockerfiles (syncthing#6143) lib/protocol: Buffer allocation when compressing (fixes syncthing#6146) (syncthing#6147) golang-ci: Upgrade, skipping the white space complainer all: Cleanups enabled by Go 1.12 lib/tlsutil: Remove Go 1.12 TLS 1.3 beta opt-in lib/api: Make theme paths relative (syncthing#6142) gui, lib/api: Adds support for prefers-color-scheme (fixes syncthing#6115) lib/api: Reset mtime after theme change (fixes syncthing#5810) (syncthing#6140) lib/model: Remove some testing deadlocks (syncthing#6138) lib/model: Add test for previous commit lib/model: Add initial deviceStatRefs on model creation (fixes syncthing#6136) (syncthing#6137) lib/model: Add folders on start in model (syncthing#6135)
Purpose
Add Dockerfiles for discovery and relay servers. Both files are mostly copy/pasta-ed from the existing syncthing Dockerfile. I slightly modified the entrypoint to allow for reuse between all three images.
This is a follow-up to #6014.
Testing
I've been running containers based on these Dockerfiles: