-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (49 loc) · 945 Bytes
/
docker-compose.yml
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
45
46
47
48
49
50
51
52
53
54
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
image: laravel-app
container_name: laravel-app
restart: unless-stopped
working_dir: /var/www/html
volumes:
- .:/var/www/html
ports:
- "9000:9000"
networks:
- laravel
depends_on:
- db
command: sh -c "php artisan migrate:fresh --seed && php-fpm"
web:
image: nginx:latest
container_name: nginx
restart: unless-stopped
ports:
- "8080:80"
volumes:
- .:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
networks:
- laravel
db:
image: mariadb:10.5
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: laravel
ports:
- 3306:3306
volumes:
- dbdata:/var/lib/mysql
networks:
- laravel
networks:
laravel:
driver: bridge
volumes:
dbdata:
driver: local