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

bad gateway when i use git plugin behind traefik #77

Open
soapoperator opened this issue Sep 7, 2017 · 0 comments
Open

bad gateway when i use git plugin behind traefik #77

soapoperator opened this issue Sep 7, 2017 · 0 comments

Comments

@soapoperator
Copy link

Hello,

I can't solve how to use the plugin behind traefik, i get a bad gateway error.

First container, my docker-compose file:

version: '2'
#
# [ server stack ]
#
services:
    web:
        image: abiosoft/caddy:php
        container_name: domaine.com
        restart: unless-stopped
        networks:
            - config_traefik_network
        ports:
            - 2016:80
        volumes:
            # app
            - ./localhost:/srv
            # configs
            - ./config/Caddyfile:/etc/Caddyfile
        labels:
            - "traefik.frontend.rule=Host:domaine.com"
            - "traefik.port=2016"
            - "traefik.backend=domaine.com"
            - "traefik.frontend.entryPoints=http,https"
            - "traefik.enable=true"
            - "traefik.docker.network=config_traefik_network"
#
# [ networks definition ]
#
networks:
    config_traefik_network:
        external: true

This caddyfile works well:

0.0.0.0:2016
fastcgi / 127.0.0.1:9000 php # php variant only
startup php-fpm7 # php variant only
browse
gzip
log stdout
errors stderr

This caddyfile doesn't work (Bad gateway):

0.0.0.0:2016
fastcgi / 127.0.0.1:9000 php # php variant only
startup php-fpm7 # php variant only
browse
gzip
log stdout
errors stderr
git github.com/user/depot . {
	hook /_webhook secret-key
}

Second container, my docker-compose file:

version: '2'
#
# [ server stack ]
#
services:
    web:
        image: abiosoft/caddy
        container_name: domain2.com
        restart: unless-stopped
        networks:
            - config_traefik_network
        ports:
            - 2015:80
        volumes:
            # app
            - ./localhost:/srv
            # configs
            - ./config/Caddyfile:/etc/Caddyfile
        labels:
            - "traefik.frontend.rule=Host:domain2.com"
            - "traefik.port=2015"
            - "traefik.backend=domain2.com"
            - "traefik.frontend.entryPoints=http,https"
            - "traefik.enable=true"
            - "traefik.docker.network=config_traefik_network"
#
# [ networks definition ]
#
networks:
    config_traefik_network:
        external: true

This caddyfile works well:

0.0.0.0:2015
browse
gzip
log stdout
errors stderr
git github.com/user/depot2 . {
	hook /_webhook secret-key
}

As far as i understand, the problem is due to php in the caddy container?
All advice are appreciate.

Thank you in advance

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

1 participant