-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (37 loc) · 812 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (37 loc) · 812 Bytes
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
version: '3'
services:
# Nginx server configuration
web:
image: nginx:1.17
container_name: webserver
depends_on:
- docker-mysql
- php
links:
- docker-mysql
- php
volumes:
- ./webcontent:/var/www/html
- ./nginx:/etc/nginx/conf.d/
ports:
- "8080:80"
# Php-fpm configuration
php:
image: php:7.2-fpm
volumes:
- ./webcontent:/var/www/html
- ./php:/usr/local/etc/php/php.ini
# Mysql configuration
docker-mysql:
image: mysql:5.7
container_name: docker-mysql-demo
restart: always
environment:
- MYSQL_DATABASE=docker_demo
- MYSQL_ROOT_PASSWORD=root123
- MYSQL_USER=root
- MYSQL_PASSWORD=root123
ports:
- "3306:3306"
volumes:
- /dbdata:/var/lib/mysql