#StackBounty: #.net #docker #configuration #traefik #swarm Traefik won't route path

Bounty: 50

To test Traefik I have made an app like whoami shown in the Traefik’s getting stated documentation that responds with a friendly message to a GET HTTP request to ‘/’ and ‘/sub’ endpoints. I’ve verified that changing whoami to answer through different paths indeed does works but for some reason, Traefik won’t resolve my app even though I’ve configured it similarly as I did with whoami. I know the first thing that comes to mind is that if I’ve configured my app the same way as I did with whoami so the problem would be my app but curl does confirm that I can reach my app from Traefik’s container so it got me wondering if there’s something baked into Traefik that whoami app would work and mine wouldn’t. I know that’s a silly assumption but I don’t see what else my app needs to do besides to respond to an HTTP Get request. You can see the app and how I’m bringing everything up here, just need to see build.sh. Another problem that I did work around it is configuring Traefik in swarm mode which I had to create a Traefik image instead of passing the configuration as an argument. The main configuration shows in the code below and traefik_rp its just an image of traefik with a tom file to set it as sarmMode.

version: '3'

services:
  traefik:
    # The official v2 Traefik docker image
    image: traefik_rp
    # Enables the web UI and tells Traefik to listen to docker
    command: --api.insecure=true --providers.docker
    ports:
      # The HTTP port
      - "80:80"
      # The Web UI (enabled by --api.insecure=true)
      - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
      
  simple_app:
    image: simpleapp
    environment: 
      ASPNETCORE_ENVIRONMENT: Release
    labels:
      - "traefik.http.routers.simple_app_service.rule=Path(`/simpleapp`)"

  whoami:
    # A container that exposes an API to show its IP address
    image: containous/whoami
    labels:
      - "traefik.http.routers.whoami.rule=Path(`/`)"

Best regards.


Get this bounty!!!

#StackBounty: #docker #docker-compose #swarm Disable external node service accessibility in docker swarm

Bounty: 50

I have a docker swarm with 2 nodes and each node run 2 services in global mode so each node have 2 services running inside it.
My problem is how to force ubuntu service in node1 only connect to mysql service in node1 and dont use round-robin method to select mysql service.
so when I connect to mysql from ubuntu in node1 with mysql -hmysql -uroot -p it select only mysql in node1.

here is the docker-compose file which describes my case

version: '3.8'
services:
  mysql:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: password
    networks:
      app-net: {}
    deploy:
      mode: global
  ubuntu:
    entrypoint: tail -f /dev/null
    deploy:
      mode: global
    image: ubuntu:20:04
    networks:
      app-net: {}
networks:
  app-net: {}

with this docker-compose file inside ubuntu container when I try to connect to mysql it selects mysql service in both nodes with round-robin algorithm.
What I try to achieve is to force each service be only visible to the services inside the same node.


Get this bounty!!!

#StackBounty: #golang #swarm Generate directory hash without upload using Swarm API

Bounty: 50

I am using the Swarm API (github.com/ethersphere/swarm/) with go to upload a directory on a private network. The client API(/api/client) provides a UploadDirectory function which returns a manifest hash. Is there a way to calculate the same Merkle Tree hash without uploading the files to the Swarm storage, preferably with the API ? The reason for doing this is to upload the directory at some later point of time and verify the hash with the one calculated before.

Any help with some possible areas I can look at would be really appreciated.


Get this bounty!!!