forked from moeen-basra/laravel-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (64 loc) · 1.34 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: "3.8"
services:
#Laravel Service
lr_app:
container_name: lr_app
restart: always
tty: true
working_dir: /var/www/app
build:
context: .
dockerfile: Dockerfile
environment:
XDEBUG_CONFIG: "idekey=IDE_DEBUG"
PHP_IDE_CONFIG: "serverName=laravel_react_app"
volumes:
- .:/var/www/app
depends_on:
- lr_database
links:
- lr_database
networks:
- lr_network
#DB Service
lr_database:
image: mariadb:latest
container_name: lr_database
restart: always
working_dir: /etc/mysql
tty: true
environment:
MYSQL_DATABASE: laravel_react
MYSQL_USER: moeen
MYSQL_ROOT_PASSWORD: basra
MYSQL_PASSWORD: basra
ports:
- 3333:3306
volumes:
- ./.docker/db/dump.sql:/docker-entrypoint-initdb.d/dump.sql
command: --default-authentication-plugin=mysql_native_password
networks:
- lr_network
#Nginx Service
lr_server:
image: nginx:alpine
container_name: lr_server
restart: always
tty: true
ports:
- 8100:8080
volumes:
- .:/var/www/app
- ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf
working_dir: /var/www
depends_on:
- lr_app
networks:
- lr_network
#Docker Networks
networks:
lr_network:
driver: bridge
volumes:
dbdata:
driver: local