Skip to content

Commit

Permalink
yii-starter-kit#654. Add pwd-compose.yml for play with docker. Add PW…
Browse files Browse the repository at this point in the history
…D button to readme.
  • Loading branch information
Alfred authored and alfredleo committed Mar 12, 2019
1 parent 3663314 commit 717752f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ It was created and developing as a fast start for building an advanced sites bas

It covers typical use cases for a new project and will help you not to waste your time doing the same work in every project

[![Try in PWD](https://github.com/play-with-docker/stacks/raw/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/yii2-starter-kit/yii2-starter-kit/master/pwd-compose.yml)

## Before you start
Please, consider helping project via [contributions](https://github.com/yii2-starter-kit/yii2-starter-kit/issues) or [donations](#donations).

Expand Down
63 changes: 63 additions & 0 deletions pwd-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
version: "3"

volumes:
starter_kit_app: {}
mysql_config: {}

services:
source:
image: containerize/git
environment:
- REPO_LOCAL=/data/git/repos/yii2-starter-kit
- REPO_BRANCH=master
- REPO_REMOTE=https://github.com/yii2-starter-kit/yii2-starter-kit.git
tty: true
volumes:
- starter_kit_app:/data/git/repos/yii2-starter-kit
- mysql_config:/data/git/repos/yii2-starter-kit/docker/mysql

app:
image: alfredleo/starter_kit_app:secondtry
volumes:
- starter_kit_app:/app
command: bash -c "cp .env.dist .env && composer install && console/yii app/setup --interactive=0 && php-fpm"
depends_on:
- source
- db
- mailcatcher

webpacker:
image: node:9-alpine
working_dir: /app
volumes:
- starter_kit_app:/app
command: /bin/true

nginx:
image: nginx:1.12-alpine
ports:
- 80:80
volumes:
- starter_kit_app:/app
command: sh -c "cp /app/docker/nginx/vhost.conf /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
depends_on:
- app
- source

mailcatcher:
image: schickling/mailcatcher:latest
ports:
- 1080:1080

db:
image: mysql:5.7
volumes:
- /var/lib/mysql
- mysql_config:/etc/mysql/conf.d
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: yii2-starter-kit
MYSQL_USER: ysk_dbu
MYSQL_PASSWORD: ysk_pass

0 comments on commit 717752f

Please sign in to comment.