Created
April 3, 2023 14:16
-
-
Save antonioanerao/b25fe34f4427057115e84687017214e7 to your computer and use it in GitHub Desktop.
Docker compose para subir traefik, servidor web, mysql e phpmyadmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
traefik: | |
image: "traefik:v2.4" | |
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 | |
livewire-webserver: | |
container_name: livewire-webserver | |
image: antonioanerao/laravel:1.0.1 | |
restart: always | |
networks: | |
- proxy | |
ports: | |
- "5173:5173" | |
volumes: | |
- ./laravel/:/laravel | |
labels: | |
- "traefik.enable=true" | |
- "traefik.docker.network=proxy" | |
- "traefik.http.routers.livewire.rule=Host(`livewire.docker.localhost`)" | |
- "traefik.http.routers.livewire.entrypoints=web" | |
mysql: | |
image: ubuntu/mysql:8.0-22.04_beta | |
container_name: "mysql" | |
restart: always | |
networks: | |
- proxy | |
environment: | |
MYSQL_DATABASE: livewire | |
MYSQL_USER: livewire | |
MYSQL_PASSWORD: livewire | |
MYSQL_RANDOM_ROOT_PASSWORD: '1' | |
volumes: | |
- mysql:/var/lib/mysql | |
phpmyadmin: | |
image: phpmyadmin | |
container_name: "phpmyadmin" | |
restart: always | |
networks: | |
- proxy | |
labels: | |
- "traefik.enable=true" | |
- "traefik.docker.network=proxy" | |
- "traefik.http.routers.phpmyadmin.rule=Host(`phpmyadmin.docker.localhost`)" | |
- "traefik.http.routers.phpmyadmin.entrypoints=web" | |
environment: | |
- PMA_ARBITRARY=1 | |
networks: | |
proxy: | |
external: true | |
volumes: | |
mysql: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment