Skip to content

Instantly share code, notes, and snippets.

@jjuanrivvera99
Last active March 19, 2021 23:09
Show Gist options
  • Save jjuanrivvera99/c155f3b5f557542bd63da6efdd9b0d6b to your computer and use it in GitHub Desktop.
Save jjuanrivvera99/c155f3b5f557542bd63da6efdd9b0d6b to your computer and use it in GitHub Desktop.
version: '3.7'
services:
php:
image: jjuanrivvera99/laravel:mysql-alpine
restart: always
depends_on:
- redis
volumes:
- ./:/var/www
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
networks:
- laravel-network
web:
image: nginx:alpine
restart: always
depends_on:
- php
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www
- ./docker/nginx/:/etc/nginx/conf.d/
networks:
- laravel-network
queue:
command: sh -c 'php artisan queue:work'
restart: always
depends_on:
- redis
image: jjuanrivvera99/laravel:mysql-alpine
volumes:
- "./:/var/www/"
networks:
- laravel-network
scheduler:
command: sh -c 'while [ true ]; do php /var/www/artisan schedule:run --verbose --no-interaction & sleep 60; done'
restart: always
depends_on:
- redis
image: jjuanrivvera99/laravel:mysql-alpine
volumes:
- "./:/var/www/"
networks:
- laravel-network
node:
command: sh -c 'tail -f /dev/null'
image: jjuanrivvera99/node:alpine
restart: always
container_name: node
volumes:
- ./:/var/www
mysql:
image: mysql:5.7
restart: always
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: example
volumes:
- mysql-data:/var/lib/mysql/
networks:
- laravel-network
redis:
image: redis
restart: always
ports:
- 6379:6379
volumes:
- redis-data:/data
networks:
- laravel-network
networks:
laravel-network:
driver: bridge
volumes:
mysql-data:
driver: local
redis-data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment