Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

External Network usage with docker-app 0.8.0-rc1 #541

Open
ChristianKniep opened this issue Jun 6, 2019 · 1 comment
Open

External Network usage with docker-app 0.8.0-rc1 #541

ChristianKniep opened this issue Jun 6, 2019 · 1 comment
Labels

Comments

@ChristianKniep
Copy link

Description

I use traefik as a proxy to allow multiple subdomains to be served under the same HTTP/HTTPS ports.

The traefik service uses the network ingress_www.

$ docker network ls |ingress_www
lk000000        ingress_www           overlay             swarm

To decouple the proxy service from the other service artifacts I created an additional dockerapp to hook into the traefik infrastructure.
But when I fire this up:

$ cat boedde.dockerapp
---
version: 0.0.1
name: boedde
description: "Boeddenstedt Audio Guide"
maintainers:
- name: Christian Kniep
  email: [email protected]
targets:
  swarm: true
  kubernetes: true
---
version: "3.7"
services:
    boedde:
      image: boeddenstedt/audio-tour:2019-06-06.1
      networks: ["ingress_www"]
      deploy:
        labels:
          traefik.port: "80"
          traefik.backend: "boedde"
          traefik.frontend.rule: "Host:boedde.qnib.org"
networks:
  ingress_www:
    external: true
---

Describe the results you received:

The docker-app commands seems to encapsulate the networks for the installation, ignoring the external: true statement.
I derive that from the Create network statement.

$ docker-app upgrade boedde
Creating network boedde_ingress_www
Error: Upgrade failed: Action "upgrade" failed: service boedde: undefined network "ingress_www"

Describe the results you expected:

I would have expected, that external networks are still possible.
When I carve out the docker-compose.yml part and deploy it as a stack, it just updates the service.

$ docker stack deploy -c docker-compose.yml boedde
Updating service boedde_boedde (id: yc4aep4ww8yz46dt7dpdkpec3)
$

Output of docker version:

Client:
 Version:           18.09.6
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        481bc77
 Built:             Sat May  4 02:35:57 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.6
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       481bc77
  Built:            Sat May  4 01:59:36 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker-app version:

Version:               v0.8.0-rc1
Git commit:            73d86744
Built:                 Fri May 24 16:20:19 2019
OS/Arch:               linux/amd64
Experimental:          off
Renderers:             none
Invocation Base Image: docker/cnab-app-base:v0.8.0-rc1

Additional environment details (AWS, VirtualBox, physical, etc.):
Running ubuntu 18.04 on a VMware node.

@scottyk537
Copy link

scottyk537 commented Jun 9, 2019

I found this also and was able to work around it by specifying the name field. Using your example yml:

version: "3.7"
services:
    boedde:
      image: boeddenstedt/audio-tour:2019-06-06.1
      networks: 
        -boedde_proxy
      deploy:
        labels:
          traefik.port: "80"
          traefik.backend: "boedde"
          traefik.frontend.rule: "Host:boedde.qnib.org"
networks:
  boedde_proxy:
    external: true
    name: ingress_www

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants