-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (46 loc) · 1.28 KB
/
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
version: '3.8'
services:
app:
build: .
container_name: laravel_app
working_dir: /var/www/html
volumes:
- .:/var/www/html
- /var/www/html/node_modules # Prevent overwriting node_modules
environment:
- APP_ENV=local
- APP_DEBUG=true
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=online_xo
- DB_USERNAME=root
- DB_PASSWORD=root
depends_on:
- db
entrypoint: ["sh", "./docker-entrypoint.sh"] # Custom entrypoint
nginx:
image: nginx:latest
container_name: nginx_server
ports:
- "80:80"
volumes:
- .:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
db:
image: mysql:5.7
container_name: mysql_db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: online_xo
MYSQL_USER: laravel_user
MYSQL_PASSWORD: secret
ports:
- "3306:3306"
command: --default-authentication-plugin=mysql_native_password
volumes:
- db_data:/var/lib/mysql
volumes:
db_data: