Last active
October 18, 2020 16:14
-
-
Save jvdi/964e9e5f7fc83f7c25866f37724f2304 to your computer and use it in GitHub Desktop.
Simple Nginx Php MySQL Server with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
# Services | |
services: | |
# Nginx Service | |
nginx: | |
image: nginx:latest | |
ports: | |
- 80:80 | |
volumes: | |
- ./:/var/www/php | |
- ./.docker/nginx/conf.d:/etc/nginx/conf.d | |
depends_on: | |
- php | |
# PHP Service | |
php: | |
image: php-fpm | |
build: ./.docker/php | |
working_dir: /var/www/php | |
volumes: | |
- ./:/var/www/php | |
depends_on: | |
- mysql | |
# MySQL Service | |
mysql: | |
image: mysql | |
ports: | |
- 3306:3306 | |
volumes: | |
- ./.docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf | |
- ./.docker/mysqldata:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: toor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment