Skip to content

Instantly share code, notes, and snippets.

@lafraga93
Created September 11, 2019 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lafraga93/c1cc696873bdc7f25246e4e0b5b304a6 to your computer and use it in GitHub Desktop.
Save lafraga93/c1cc696873bdc7f25246e4e0b5b304a6 to your computer and use it in GitHub Desktop.
Docker Compose V3 - Docker Tutorial
version: "3.7"
services:
nginx:
image: nginx:1.17.3
container_name: nginx
ports:
- "8080:80"
volumes:
- ".:/var/www/html/"
- "./webserver/nginx.conf:/etc/nginx/nginx.conf"
links:
- php
- mysql
php:
build:
context: .
image: phpdocker
container_name: php
ports:
- "9000:9000"
volumes:
- ".:/var/www/html/"
# command: php -S 0.0.0.0:9000 -t public/
# links:
# - mysql
mysql:
image: mysql:5.7
container_name: mysql
ports:
- "3307:3306"
volumes:
- mysql:/var/lib/mysql/
environment:
MYSQL_DATABASE: 'database'
MYSQL_USER: 'root'
MYSQL_PASSWORD: '12345678'
MYSQL_ROOT_PASSWORD: '12345'
volumes:
mysql:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment