laravel_docker/docker-compose.yaml

39 lines
821 B
YAML
Raw Normal View History

2022-07-13 16:34:56 +02:00
version: '3.8'
services:
laravel:
container_name: laravel
image: laravel/zarif:v1
ports:
- '80:80'
volumes:
- ./src:/var/www/laravel_docker # add laravel php project in this folder
- ./apache/default.conf:/etc/apache2/sites-enabled/000-default.conf
depends_on:
- database
networks:
laravel-back-network:
database:
image: mysql:latest
container_name: laravel_database
volumes:
- laravel-db:/var/lib/mysql
restart: unless-stopped
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_PASSWORD=laravel
- MYSQL_USER=laravel
- MYSQL_DATABASE=laravel
networks:
laravel-back-network:
volumes:
laravel-db:
networks:
laravel-back-network:
driver: bridge
# docker build -t laravel/docker:v1 ./php