-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
52 lines (52 loc) · 1.36 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
services:
laravel:
build: .
container_name: laravel
working_dir: /var/www
volumes:
- ./:/var/www
environment:
- DB_CONNECTION=mysql
- DB_HOST=db
- DB_PORT=3306
- DB_DATABASE=museum
depends_on:
- mysql
networks:
- app-network
mysql:
image: mysql:latest
container_name: mysql
ports:
- "3306:3306"
volumes:
# - ./.docker/mysql/data:/var/lib/mysql # for saving mysql data on my local machine
- ./docker/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql # for running sql script on mysql container start
environment:
MYSQL_DATABASE: museum
MYSQL_ALLOW_EMPTY_PASSWORD: 1
networks:
- app-network
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
ports:
- "3400:80"
depends_on:
- mysql
networks:
- app-network
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./docker/nginx/default.conf/:/etc/nginx/conf.d/app.conf
- ./:/var/www
depends_on:
- laravel
networks:
- app-network
networks:
app-network:
driver: bridge