Skip to content

Commit c7c042b

Browse files
committedMay 29, 2018
fixing production scripts
1 parent 5dd0753 commit c7c042b

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed
 

‎docker_run-dev.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ if [ ! -f /.inited ]; then
1414
echo "Since it is the first launch, we will install project dependencies and seed the database."
1515

1616
composer install
17-
php artisan db:seed --force
18-
php artisan migrate --force
17+
php artisan migrate:fresh --seed --force
1918

2019
touch /.inited
2120
fi

‎docker_run.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ set -e
44
env >> /var/www/.env
55
php-fpm7.1 -D
66
cd /var/www/
7-
php artisan db:seed --force
8-
php artisan migrate --force
7+
php artisan migrate:fresh --seed --force
98
nginx -g "daemon off;"

‎resources/sql/seed.sql

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
DROP SCHEMA IF EXISTS public CASCADE;
2-
3-
CREATE SCHEMA public;
4-
51
DROP TABLE IF EXISTS users CASCADE;
62
DROP TABLE IF EXISTS moderators CASCADE;
73
DROP TABLE IF EXISTS messages CASCADE;

‎upload_image.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ IMAGE_NAME=lbaw1763
1010
docker exec lbaw_php composer install # Ensure that dependencies are available
1111
docker exec lbaw_php php artisan clear-compiled
1212
docker exec lbaw_php php artisan optimize
13-
docker exec lbaw_php php artisan db:seed --force
14-
docker exec lbaw_php php artisan migrate --force
13+
docker exec lbaw_php php artisan migrate:fresh --seed --force
1514

1615
docker build -t $DOCKER_USERNAME/$IMAGE_NAME .
1716
docker push $DOCKER_USERNAME/$IMAGE_NAME

0 commit comments

Comments
 (0)
Please sign in to comment.