laravel_docker/docker-compose.yaml
2022-07-17 16:43:30 +02:00

39 lines
820 B
YAML

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/zarif:v1 ./php