-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (40 loc) · 883 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (40 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3.8'
services:
app:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: laravel_app
volumes:
- ./:/var/www/html
- ./vendor:/var/www/html/vendor
ports:
- "8181:80"
networks:
- laravel
command: >
bash -c "
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache &&
chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache &&
apache2-foreground
"
db:
image: mysql:8
container_name: mysql_db
restart: unless-stopped
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: laravel
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: laravel
MYSQL_PASSWORD: laravel
volumes:
- dbdata:/var/lib/mysql
networks:
- laravel
volumes:
dbdata:
networks:
laravel:
driver: bridge