Skip to content

Instantly share code, notes, and snippets.

@eklect
Created April 10, 2019 19:57
Show Gist options
  • Save eklect/7ad8e16ee114de229e40401a94d8e19f to your computer and use it in GitHub Desktop.
Save eklect/7ad8e16ee114de229e40401a94d8e19f to your computer and use it in GitHub Desktop.
Docker -> Example docker-compose.yml file
version: '3'
services:
devbox:
build:
context: ./
dockerfile: DevBox.DockerFile
ports:
- "80:80"
- "443:443"
volumes:
- /path/of/my/local/filesystem:/path/to/mount/into/containers/filesystem
devmysql:
build:
context: ./
dockerfile: MySQLDev.DockerFile
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ''
MYSQL_ALLOW_EMPTY_PASSWORD : 'yes'
restart: always
volumes:
- /database/path/of/my/local/filesystem:/database/path/to/mount/into/containers/filesystem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment