Skip to content

Instantly share code, notes, and snippets.

@antonioanerao
Created September 19, 2023 17:41
Show Gist options
  • Save antonioanerao/a87788ab3dad79fa7759ac851ff187cb to your computer and use it in GitHub Desktop.
Save antonioanerao/a87788ab3dad79fa7759ac851ff187cb to your computer and use it in GitHub Desktop.
Docker compose com traefik e laravel
version: "3.3"
services:
traefik:
image: "traefik"
container_name: "traefik"
restart: always
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- proxy
sigep-auth:
container_name: sigep-auth
image: antonioanerao/laravel:1.2.0
restart: always
networks:
proxy
volumes:
- ./laravel/:/laravel
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.sigep-auth.rule=Host(`auth.sigep.docker.localhost`)"
- "traefik.http.routers.sigep-auth.entrypoints=web"
networks:
proxy:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment