Skip to content

Instantly share code, notes, and snippets.

@lafraga93
Created September 11, 2019 14:11
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/8ad0d63fa0acab1fe2e9feab1669856b to your computer and use it in GitHub Desktop.
Save lafraga93/8ad0d63fa0acab1fe2e9feab1669856b to your computer and use it in GitHub Desktop.
Docker Compose V2 - Docker Tutorial
version: "3.7"
services:
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