# Support P2P communication between P2Panda Apps
Apps built with the set of [P2Panda](https://p2panda.org/) libraries perform P2P communication over two UDP ports. The default ports for these are 2022 and 2023.
There aren't really a lot (any?) P2Panda web apps out there, most are desktop or mobile apps.
So, this change is being specifically request by the [LoRes Tech](https://lores.tech/) project in order to support our [LoRes Node](https://github.com/local-resilience-tech/lores-node/) app. We have a recipe drafted for this [here](https://codeberg.org/lores/lores-node-coop-cloud-recipe) and we will push that to the catalogue once this change is in.
It seems better to make this kiwix change as general as possible, which is why we called the flag `P2PANDA_ENABLED` rather than `LORES_NODE_ENABLED`. In practice if there was a larger ecosystem of such apps, we'd probably need to make the actual port numbers configurable.
Reviewed-on: #70
Reviewed-by: p4u1 <p4u1@noreply.git.coopcloud.tech>
Co-authored-by: Jade Ambrose <jade@noreply.git.coopcloud.tech>
Co-committed-by: Jade Ambrose <jade@noreply.git.coopcloud.tech>
The default docker swarm endpoint mode (vip) introduces unnecessary
indirection in the communication between services, namely the
docker-proxy and a dynamic haproxy endpoint container. This commit
switches the socket-proxy service to endpoint_mode: dnsrr by default and
the traefik service when using host-mode port publishing.
I would strongly recommend considering switching to host-mode port
publishing by default, especially as most coop-cloud deployments are
single-server.
See: toolshed/organising#648
Thanks to @mirsal. Rebased and merged from the following commit.
abbb3255f8
The default docker swarm endpoint mode (vip) introduces unnecessary
indirection in the communication between services, namely the
docker-proxy and a dynamic haproxy endpoint container. This commit
switches the socket-proxy service to endpoint_mode: dnsrr by default and
the traefik service when using host-mode port publishing.
I would strongly recommend considering switching to host-mode port
publishing by default, especially as most coop-cloud deployments are
single-server.
See: toolshed/organising#648
All contributions should be made via a pull request. This is to ensure a certain quality / consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- respond to pull requests / issues within a week
- make image security updates within a day
- make image patch / minor updates within a week
- make image major updates within a month
In order to fullfill these responsibilities a recipe maintainer:
- has to watch the repository (to get notifications)
- needs to make sure renovate is configured properly
## Merge rules
A pull request can be merged if it is approved by at least one maintainer. For pull requests opened by a maintainer they need to be approved by another maintainer.
## Becoming a maintainer
Everyone can apply to be a recipe maintainer. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
Updates Traefik from v2 to v3. Migration notes here: https://doc.traefik.io/traefik/migration/v2-to-v3-details/#configuration-details-for-migrating-from-traefik-v2-to-v3 By default, syntax for Traefik rules in recipes still use v2 syntax. To upgrade a recipe to use v3 label syntax, set the ruleSyntax label in the recipe per: https://doc.traefik.io/traefik/reference/routing-configuration/http/router/rules-and-priority/#rulesyntax
Expose log_max_age option. This option controls Traefik's maximum retention for log files in number of days. By default (when LOG_MAX_AGE=0), files are not removed based on age.
{{ if eq (env "FILE_PROVIDER_DIRECTORY_ENABLED") "1" }}
file:
directory: /etc/traefik/file-providers
watch: true
{{ else }}
file:
filename: /etc/traefik/file-provider.yml
{{ end }}
api:
dashboard: {{ env "DASHBOARD_ENABLED" }}
@ -28,6 +37,16 @@ entrypoints:
gitea-ssh:
address: ":2222"
{{ end }}
{{ if eq (env "P2PANDA_ENABLED") "1" }}
p2panda-udp-v4:
address: ":2022/udp"
p2panda-udp-v6:
address: ":2023/udp"
{{ end }}
{{ if eq (env "GARAGE_RPC_ENABLED") "1" }}
garage-rpc:
address: ":3901"
{{ end }}
{{ if eq (env "FOODSOFT_SMTP_ENABLED") "1" }}
foodsoft-smtp:
address: ":2525"
@ -40,6 +59,10 @@ entrypoints:
peertube-rtmp:
address: ":1935"
{{ end }}
{{ if eq (env "WEB_ALT_ENABLED") "1" }}
web-alt:
address: ":8000"
{{ end }}
{{ if eq (env "SSB_MUXRPC_ENABLED") "1" }}
ssb-muxrpc:
address: ":8008"
@ -58,9 +81,16 @@ entrypoints:
compy:
address: ":9999"
{{ end }}
{{ if eq (env "IRC_ENABLED") "1" }}
irc:
address: ":6697"
{{ end }}
{{ if eq (env "METRICS_ENABLED") "1" }}
metrics:
address: ":8082"
http:
middlewares:
- basicauth@file
{{ end }}
{{ if eq (env "MATRIX_FEDERATION_ENABLED") "1" }}
matrix-federation:
@ -74,6 +104,8 @@ ping:
metrics:
prometheus:
entryPoint: metrics
addRoutersLabels: true
addServicesLabels: true
{{ end }}
certificatesResolvers:
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.