Created
April 10, 2024 15:54
-
-
Save nicholascourage/7cd41922e85b097c8596d7dd66c379fb to your computer and use it in GitHub Desktop.
Laravel Nuxt docker-compose.yml
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' | |
networks: | |
laravel-nuxt: | |
services: | |
nginx: | |
container_name: nginx | |
build: | |
context: .docker/nginx | |
dockerfile: Dockerfile | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./:/var/www/html | |
- .docker/nginx/laravel-nuxt.conf:/etc/nginx/conf.d/laravel-nuxt.conf | |
- .docker/nginx/ssl/laravel-nuxt.local.pem:/etc/nginx/ssl/laravel-nuxt.local.pem | |
- .docker/nginx/ssl/laravel-nuxt.local-key.pem:/etc/nginx/ssl/laravel-nuxt.local-key.pem | |
depends_on: | |
- php | |
networks: | |
- laravel-nuxt | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
php: | |
container_name: php | |
build: | |
context: .docker/php | |
dockerfile: Dockerfile | |
volumes: | |
- ./:/var/www/html | |
ports: | |
- 9000:9000 | |
networks: | |
- laravel-nuxt | |
redis: | |
container_name: redis | |
image: 'redis:latest' | |
tty: true | |
ports: | |
- '6379:6379' | |
networks: | |
- laravel-nuxt | |
mysql: | |
container_name: mysql | |
image: mysql:latest | |
restart: unless-stopped | |
tty: true | |
ports: | |
- 3306:3306 | |
volumes: | |
- .docker/mysql:/var/lib/mysql | |
environment: | |
MYSQL_DATABASE: laravel-nuxt | |
MYSQL_USER: admin | |
MYSQL_PASSWORD: secret | |
MYSQL_ROOT_PASSWORD: secret | |
SERVICE_TAGS: dev | |
SERVICE_NAME: mysql | |
networks: | |
- laravel-nuxt | |
artisan: | |
container_name: artisan | |
build: | |
context: .docker/php | |
dockerfile: Dockerfile | |
volumes: | |
- ./:/var/www/html | |
working_dir: /var/www/html | |
entrypoint: ["php","/var/www/html/artisan"] | |
networks: | |
- laravel-nuxt | |
npm: | |
container_name: npm | |
image: node:latest | |
volumes: | |
- ./:/var/www/html | |
working_dir: /var/www/html | |
entrypoint: ['npm'] | |
networks: | |
- laravel-nuxt | |
yarn: | |
container_name: yarn | |
image: node:latest | |
volumes: | |
- ./:/var/www/html | |
working_dir: /var/www/html | |
entrypoint: [ 'yarn' ] | |
networks: | |
- laravel-nuxt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment