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