Skip to content

Instantly share code, notes, and snippets.

@cornernote
Last active April 19, 2017 17:50
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 cornernote/850a48f6d361b3401ec4f293438f55c6 to your computer and use it in GitHub Desktop.
Save cornernote/850a48f6d361b3401ec4f293438f55c6 to your computer and use it in GitHub Desktop.
Docker Testing

Docker Testing

Head over to http://labs.play-with-docker.com/ and create a new instance.

Download an application definition

curl -Lo docker-compose.yml https://gist.githubusercontent.com/cornernote/850a48f6d361b3401ec4f293438f55c6/raw/c1169161191127bc9415bdc42203e7b640b21a48/docker-compose.yml

Run the application setup

docker-compose run --rm php yii migrate --interactive=0

And start the application

docker-compose up -d

Your services will be available on their mapped port, just click the label right next to the node IP address.

Login with admin / `secret

version: '2'
services:
php:
image: cornernote/timesheet
ports:
- 80:80
depends_on:
- db
db:
command: --character-set-server=utf8 --collation-server=utf8_general_ci
image: percona:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=timesheet
- MYSQL_DATABASE=timesheet
- MYSQL_PASSWORD=timesheet
ports:
- 3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment