Skip to content

Commit

Permalink
move prepare inside of container
Browse files Browse the repository at this point in the history
  • Loading branch information
klepek committed Sep 28, 2018
1 parent b6720d1 commit 07af2dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
cd /var/www/scrumonline
/usr/bin/php ./bin/composer install
cp src/sample-config.php src/config.php
# Overwrite host
echo '$host = "http://localhost:8080";' >> src/config.php
6 changes: 2 additions & 4 deletions docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ image=scrum-lamp
case $command in
"prepare")
echo "Preparing repository for usage with docker"
php bin/composer install
cp src/sample-config.php src/config.php
# Overwrite host
echo '$host = "http://localhost:8080";' >> src/config.php
# run container with entrypoint which prepares container
docker run --rm --name scrumonline -v $(pwd):/var/www/scrumonline --entrypoint /var/www/scrumonline/build.sh scrum-lamp
;;
"start")
running=$(docker ps -a -q | grep $container_name)
Expand Down

0 comments on commit 07af2dc

Please sign in to comment.