Skip to content

Instantly share code, notes, and snippets.

@woodyxiong
Last active September 23, 2018 11:58
Show Gist options
  • Save woodyxiong/52971cfc6e586f857593eecac9875484 to your computer and use it in GitHub Desktop.
Save woodyxiong/52971cfc6e586f857593eecac9875484 to your computer and use it in GitHub Desktop.
docker-compose.yml
version: '3'
services:
nginx:
image: nginx
ports:
- "${HTTP_PORT:-80}:80"
volumes:
- ../:/data/www #注意路径
- ./default.conf:/etc/nginx/conf.d/default.conf #注意路径
links:
- php
php:
image: php:fpm
ports:
- "9000:9000"
volumes:
- ../:/data/www #注意路径
mysql:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: "123456"
ports:
- "${MYSQL_PORT:-23306}:3306"
volumes:
- "./Config/mysql:/var/lib/mysql" #注意路径
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment