Skip to content

Commit

Permalink
yii-starter-kit#654. Add containerize/git as a workaround for volumes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred committed Feb 23, 2019
1 parent d436ba9 commit c4bd606
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions pwd-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: "3"

volumes:
starter_kit_app: {}
mysql_config: {}
nginx_config: {}

services:
app:
build: docker/php
volumes:
- ./:/app
- starter_kit_app:/app
depends_on:
- db
- mailcatcher
Expand All @@ -15,16 +20,16 @@ services:
image: node:9-alpine
working_dir: /app
volumes:
- ./:/app
- starter_kit_app:/app
command: /bin/true

nginx:
image: nginx:1.12-alpine
ports:
- 80:80
volumes:
- ./:/app
- ./docker/nginx/vhost.conf:/etc/nginx/conf.d/vhost.conf
- starter_kit_app:/app
- nginx_config:/etc/nginx/conf.d/vhost.conf
depends_on:
- app

Expand All @@ -37,11 +42,23 @@ services:
image: mysql:5.7
volumes:
- /var/lib/mysql
- ./docker/mysql/config.cnf:/etc/mysql/conf.d/config.cnf
- mysql_config:/etc/mysql/conf.d/config.cnf
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: yii2-starter-kit
MYSQL_USER: ysk_dbu
MYSQL_PASSWORD: ysk_pass

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/config.cnf
- nginx_config:/data/git/repos/yii2-starter-kit/docker/nginx/vhost.conf

0 comments on commit c4bd606

Please sign in to comment.