-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
75 lines (72 loc) · 1.65 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
68
69
70
71
72
73
74
75
version: "3.8"
services:
#Laravel Service
lr_app:
container_name: lr_app
restart: always
stdin_open: true
tty: true
working_dir: /var/www/app
extra_hosts:
- "${HOST_IP}:host-gateway"
build:
context: .
dockerfile: Dockerfile
args:
- HOST_IP=${HOST_IP}
environment:
XDEBUG_CONFIG: "idekey=PHPSTORM"
PHP_IDE_CONFIG: "serverName=laravel-crud-boilerplate"
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_crud_boilerplate
MYSQL_USER: tester
MYSQL_ROOT_PASSWORD: test1235
MYSQL_PASSWORD: test1235
ports:
- 3333:3306
volumes:
#- ./.docker/db/data:/var/lib/mysql
- ./.docker/db/log:/var/log/mysql
- ./.docker/db/dump.sql:/docker-entrypoint-initdb.d/dump.sql
command: --default-authentication-plugin=mysql_native_password --transaction-isolation=READ-COMMITTED --binlog-format=ROW --log-bin
networks:
- lr_network
#Nginx Service
lr_server:
image: nginx:alpine
container_name: lr_server
restart: always
stdin_open: true
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