make build perform asset compilation

This commit is contained in:
Gabe Conradi
2015-01-15 12:42:15 -05:00
parent 04e3f1d484
commit 38b70ec51a
3 changed files with 9 additions and 2 deletions

View File

@@ -1,2 +1,5 @@
node_modules
public/css
public/build
public/js
.git

View File

@@ -14,6 +14,10 @@ ENV DB_DRIVER=mysql \
COPY . /var/www/html/
WORKDIR /var/www/html/
RUN curl http://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz -o /tmp/nodejs.tar.gz && \
tar xzf /tmp/nodejs.tar.gz -C /tmp && export PATH=/tmp/node-v0.10.35-linux-x64/bin:$PATH && \
npm install && node_modules/.bin/bower install --allow-root && node_modules/.bin/gulp && \
rm -rf /tmp/* node_modules/
# ensure the assets have been compiled
RUN for d in public/{build,css,js} ; do test ! -d public/build && \
echo "Run 'gulp' before building container" >&2 && exit 1 || : ; done

View File

@@ -52,13 +52,13 @@ docker run --name mysql -e MYSQL_USER=$DB_USERNAME -e MYSQL_PASSWORD=$DB_PASSWOR
Initialize the DB if you havent yet:
```
docker run --link mysql:mysql -e DB_HOST=mysql -e DB_DATABASE=$DB_DATABASE -e DB_USERNAME=$DB_USERNAME -e DB_PASSWORD=$DB_PASSWORD byxorna/cachet:test php artisan migrate
docker run --link mysql:mysql -e DB_HOST=mysql -e DB_DATABASE=$DB_DATABASE -e DB_USERNAME=$DB_USERNAME -e DB_PASSWORD=$DB_PASSWORD cachethq/cachet:latest php artisan migrate
```
Run Cachet:
```
docker run -d --link mysql:mysql -p 80:80 -e DB_HOST=mysql -e DB_DATABASE=$DB_DATABASE -e DB_USERNAME=$DB_USERNAME -e DB_PASSWORD=$DB_PASSWORD byxorna/cachet:test
docker run -d --name cachet --link mysql:mysql -p 80:80 -e DB_HOST=mysql -e DB_DATABASE=$DB_DATABASE -e DB_USERNAME=$DB_USERNAME -e DB_PASSWORD=$DB_PASSWORD cachethq/cachet:latest
```
Now go to ```http://<ipdockerisboundto>/setup``` and have fun!