From 566342928037b0116ea44c76f17167e18a3ebb1a Mon Sep 17 00:00:00 2001 From: Kasey Date: Fri, 31 Mar 2017 15:43:37 -0700 Subject: [PATCH] applying PR #3456 changes to develop branch (#3472) * updating with changes made to master apply PR # 3456 to develop as well * updating develop with changes made to master apply PR # 3456 to develop as well * updating paveit with passport-created oauth tables --- Dockerfile | 7 ++++--- app/Console/Commands/PaveIt.php | 5 +++++ docker/entrypoint.sh | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 712b29217a..8edb3f0cee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:trusty +FROM debian:jessie-slim MAINTAINER Brady Wetherington RUN apt-get update && apt-get install -y \ @@ -13,7 +13,9 @@ patch \ curl \ vim \ git \ -mysql-client +mysql-client \ +&& apt-get clean \ +&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN php5enmod mcrypt RUN php5enmod gd @@ -55,7 +57,6 @@ RUN chown -R docker /var/www/html RUN \ rm -r "/var/www/html/storage/private_uploads" && ln -fs "/var/lib/snipeit/data/private_uploads" "/var/www/html/storage/private_uploads" \ - && mkdir -p "/var/lib/snipeit/data/uploads/{assets,avatars,barcodes,models,suppliers}" \ && rm -rf "/var/www/html/public/uploads" && ln -fs "/var/lib/snipeit/data/uploads" "/var/www/html/public/uploads" \ && rm -r "/var/www/html/storage/app/backups" && ln -fs "/var/lib/snipeit/dumps" "/var/www/html/storage/app/backups" diff --git a/app/Console/Commands/PaveIt.php b/app/Console/Commands/PaveIt.php index 185f6b4ef6..c7a3954dbc 100644 --- a/app/Console/Commands/PaveIt.php +++ b/app/Console/Commands/PaveIt.php @@ -117,6 +117,11 @@ class PaveIt extends Command \DB::statement('drop table IF EXISTS manufacturers'); \DB::statement('drop table IF EXISTS models'); \DB::statement('drop table IF EXISTS migrations'); + \DB::statement('drop table IF EXISTS oauth_access_tokens'); + \DB::statement('drop table IF EXISTS oauth_auth_codes'); + \DB::statement('drop table IF EXISTS oauth_clients'); + \DB::statement('drop table IF EXISTS oauth_personal_access_clients'); + \DB::statement('drop table IF EXISTS oauth_refresh_tokens'); \DB::statement('drop table IF EXISTS password_resets'); \DB::statement('drop table IF EXISTS requested_assets'); \DB::statement('drop table IF EXISTS requests'); diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 7ea4e01d23..d43f37aa63 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -18,7 +18,7 @@ else fi # create data directories -for dir in 'data/private_uploads' 'data/uploads' 'data/uploads/avatars' 'data/uploads/models' 'data/uploads/suppliers' 'dumps'; do +for dir in 'data/private_uploads' 'data/uploads' 'data/uploads/avatars' 'data/uploads/barcodes' 'data/uploads/models' 'data/uploads/suppliers' 'dumps'; do mkdir -p "/var/lib/snipeit/$dir" done