-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (52 loc) · 1.32 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
services:
nginx:
build:
context: ./infra/nginx
ports:
- "8080:8080"
volumes:
- ./infra/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./project_name:/var/www/html # replace project_name with your desired value
depends_on:
- php
php:
build:
context: ./infra/php
expose:
- "9001" # replaced 9001 if there is conflict on this port.
ports:
- "8081:9001" # replaced 9001 if there is conflict on this port.
volumes:
- ./project_name:/var/www/html # replace project_name with your desired value
depends_on:
- mysql
mysql:
build:
context: ./infra/mysql
platform: linux/x86_64
ports:
- "3307:3307" # replaced 3307 if there is conflict on this port. usuall value is 3306
environment:
- "LANG=C.UTF-8"
- "MYSQL_ROOT_PASSWORD=password" # replaced password on your desired value
- "MYSQL_DATABASE=database_name" # replaced database name on your desired value
volumes:
- type: volume
source: mysql-volume
target: /var/lib/mysql
command: --port=3307
phpmyadmin:
build:
context: ./infra/phpmyadmin
restart: always
ports:
- 8090:80
depends_on:
- mysql
- php
networks:
default:
driver: bridge
volumes:
mysql-volume:
driver: local