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