Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traefik 2 released, and container stop working. #401

Closed
Niklan opened this issue Sep 17, 2019 · 15 comments
Closed

Traefik 2 released, and container stop working. #401

Niklan opened this issue Sep 17, 2019 · 15 comments

Comments

@Niklan
Copy link
Contributor

Niklan commented Sep 17, 2019

https://hub.docker.com/_/traefik?tab=tags

The Traefik 2 is released. Since in docker-compose.yml we have

  traefik:
    image: traefik

It gets the last available release. But seems 1.7 and 2.0 is not BC releases and this cause problem.

As a temporary solution I used a specific tag:

  traefik:
    image: traefik:v1.7.16-alpine

docker-compose.yml must be updated to traefik 2 settings or have a tag version as other containers.

@ChristopheCaron
Copy link

Same issue, with the specific tag indicated by Niklan, it works perfectly as temporary solution.

@brianV
Copy link
Contributor

brianV commented Sep 17, 2019

PR in #402 should provide a temporary fix until Traefik 2.0 can be fully supported.

@devkinetic
Copy link

devkinetic commented Sep 17, 2019

traefik.yml

version: '2'

services:
  traefik:
    image: traefik:v2.0
    restart: unless-stopped
    command:
      - "--api.insecure=true"
      - "--providers.docker"
      - "--providers.docker.exposedbydefault=false"
    networks:
      - "xxxx"
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

networks:
  xxxx:
    external:
      name: xxxx_default

Replace the existing rules in docker compose with something like this:

- "traefik.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_portainer.rule=Host(`portainer.${PROJECT_BASE_URL}`)"

YMMV

@csandanov csandanov pinned this issue Sep 18, 2019
@csandanov
Copy link
Member

Merged #402 to pin traefik to v1. Upgrade to v2 will be performed with the next release

@mralexho
Copy link

mralexho commented Sep 24, 2019

Anyone know why the alpine image is slightly larger (+5mb)? And what, if any, are the differences behind the scenes?

@csandanov
Copy link
Member

perhaps the previous latest image wasn't actually alpine-based but was from scratch, so I guess the right tag would be just 1.7 instead of v1.7.16-alpine but I don't it makes a difference

@xcusso
Copy link

xcusso commented Oct 10, 2019

The same isssue in local multisite traefik.yml.
Solved:
`version: '2'

services:
traefik:
image: traefik:v1.7.16-alpine
restart: unless-stopped
command: -c /dev/null --web --docker --logLevel=DEBUG
networks:
- project1
- project2`

@csandanov
Copy link
Member

Docker4Drupal 5.4.11 has been released with traefik v2 support, update your docker-compose.yml with new traefik service and traefik labels.

@xcusso
Copy link

xcusso commented Oct 10, 2019

Still problems with multiple project in local environment using traefik:v2.0 or traefik:v2.0.2
Container traefik restart every few seconds.
In logs we can see:
command traefik error: failed to decode configuration from flags: field not found, node: c

@csandanov
Copy link
Member

You should update the command of traefik service.

@xcusso
Copy link

xcusso commented Oct 11, 2019

Sorry for my insistence, I will say that you must update traefik.yml to adjust to the parameters of docker-compose.yml (traefik section). If you download Docker4Drupal 5.4.11 to install in multiple project in local environment they still fails..

@sandykadam
Copy link

@csandanov so you mean to say now we can run multiple docker projects with this new traefik?
Like ..

/var/www/html/project1 - docker-compose up

-- different prompt
/var/www/html/project2 - docker-compose up

@xcusso
Copy link

xcusso commented Oct 11, 2019

No. Install a traefik container for all the projects (dockers) in the same server (ip). See: https://wodby.com/docs/stacks/drupal/local/ section: Running multiple Projects.

@csandanov
Copy link
Member

traefik.yml content is now also updated for v2, missed that before

@elannaud
Copy link

has the same error message when an Apache is running before i launch traefik

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

No branches or pull requests

9 participants