Created
July 17, 2024 22:45
-
-
Save fernastereo/f766c45f8c780ca5f9bc3aac35403190 to your computer and use it in GitHub Desktop.
This file contains hidden or 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' | |
| services: | |
| #nginx | |
| ventanilla-unica-api: | |
| image: nginx:latest | |
| container_name: api | |
| ports: | |
| - "5000:80" | |
| volumes: | |
| - ./ventanilla-unica-api:/var/www/html | |
| - ./nginx/default.conf:/etc/nginx/conf.d/default.conf | |
| depends_on: | |
| - php | |
| - mysql | |
| networks: | |
| - laravel | |
| #php | |
| php: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: php | |
| volumes: | |
| - ./ventanilla-unica-api:/var/www/html | |
| user: 1000:1000 | |
| networks: | |
| - laravel | |
| #composer | |
| composer: | |
| image: composer:latest | |
| container_name: composer | |
| user: 1000:1000 | |
| volumes: | |
| - ./ventanilla-unica-api:/var/www/html | |
| working_dir: /var/www/html | |
| depends_on: | |
| - php | |
| networks: | |
| - laravel | |
| #artisan | |
| artisan: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: artisan | |
| volumes: | |
| - ./ventanilla-unica-api:/var/www/html | |
| depends_on: | |
| - mysql | |
| working_dir: /var/www/html | |
| entrypoint: ['php', '/var/www/html/artisan'] | |
| networks: | |
| - laravel | |
| #mysql | |
| mysql: | |
| image: mysql:5.7 | |
| platform: linux/amd64 | |
| container_name: mysql | |
| restart: unless-stopped | |
| tty: true | |
| ports: | |
| - "9090:3306" | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| environment: | |
| MYSQL_DATABASE: laravel | |
| MYSQL_ROOT_PASSWORD: secret | |
| MYSQL_USER: laravel_user | |
| MYSQL_PASSWORD: secret | |
| SERVICE_TAGS: dev | |
| SERVICE_NAME: mysql | |
| networks: | |
| - laravel | |
| #phpmyadmin | |
| phpmyadmin: | |
| image: phpmyadmin/phpmyadmin | |
| platform: linux/amd64 | |
| container_name: phpmyadmin_bd | |
| depends_on: | |
| - mysql | |
| restart: unless-stopped | |
| ports: | |
| - "5010:80" | |
| environment: | |
| PMA_HOST: mysql | |
| MYSQL_ROOT_PASSWORD: secret | |
| networks: | |
| - laravel | |
| #npm | |
| npm: | |
| image: node:latest | |
| container_name: npm | |
| volumes: | |
| - ./ventanilla-unica-api:/var/www/html | |
| working_dir: /var/www/html | |
| entrypoint: ['npm'] | |
| networks: | |
| - laravel | |
| mailhog: | |
| image: mailhog/mailhog:latest | |
| container_name: mailhog | |
| ports: | |
| - "1025:1025" | |
| - "5015:8025" | |
| networks: | |
| - laravel | |
| # Servicio para el frontend de Vue.js (dev) | |
| ventanilla-unica-spa-dev: | |
| # conteneddor con node para el frontend en desarrollo | |
| # command: docker exec -it spa-dev sh npm run dev | |
| image: node:alpine | |
| container_name: spa-dev | |
| entrypoint: /bin/sh | |
| ports: | |
| - 5001:8000 | |
| working_dir: /srv/app | |
| volumes: | |
| - type: bind | |
| source: ./ventanilla-unica-spa | |
| target: /srv/app | |
| tty: true | |
| networks: | |
| - laravel | |
| networks: | |
| laravel: | |
| volumes: | |
| db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment