Spaces:
Sleeping
Sleeping
Commit ·
1edd4ab
1
Parent(s): 383d6ae
dockerfile update
Browse files- Dockerfile +12 -1
- app/app/Models/Usuario.php +1 -1
Dockerfile
CHANGED
|
@@ -59,4 +59,15 @@ sed -i "s|\$DB-USERNAME|$DB_USERNAME|" .env && \
|
|
| 59 |
sed -i "s|\$DB-HOST|$DB_HOST|" .env && \
|
| 60 |
sed -i "s|\$DB-PORT|$DB_PORT|" .env && \
|
| 61 |
sed -i "s|\$DB-PASSWORD|$DB_PASSWORD|" .env && \
|
| 62 |
-
echo "===================== composer clear-cache";composer clear-cache;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
sed -i "s|\$DB-HOST|$DB_HOST|" .env && \
|
| 60 |
sed -i "s|\$DB-PORT|$DB_PORT|" .env && \
|
| 61 |
sed -i "s|\$DB-PASSWORD|$DB_PASSWORD|" .env && \
|
| 62 |
+
echo "===================== composer clear-cache";composer clear-cache; \
|
| 63 |
+
echo "===================== composer install"; composer install; \
|
| 64 |
+
echo "===================== chown -R ubuntu:ubuntu $HOME/example-app"; chown -R ubuntu:ubuntu $HOME/example-app; \
|
| 65 |
+
echo "===================== php artisan cache:clear" ; php artisan cache:clear ; \
|
| 66 |
+
echo "===================== php artisan config:clear" ; php artisan config:clear ; \
|
| 67 |
+
echo "===================== php artisan config:cache" ; php artisan config:cache ; \
|
| 68 |
+
echo "===================== php artisan storage:link"; php artisan storage:link; \
|
| 69 |
+
echo "===================== chmod 777 -R $HOME/example-app";chmod 777 -R $HOME/example-app; \
|
| 70 |
+
echo "===================== php artisan migrate"; php artisan migrate; \
|
| 71 |
+
echo "===================== php artisan migrate:status"; php artisan migrate:status; \
|
| 72 |
+
echo "===================== tree /home/ubuntu/example-app" ; tree /home/ubuntu/example-app ; \
|
| 73 |
+
echo "===================== php artisan serve --host=0.0.0.0 --port=7860"; php artisan serve --host=0.0.0.0 --port=7860
|
app/app/Models/Usuario.php
CHANGED
|
@@ -35,7 +35,7 @@ class Usuario extends Authenticatable
|
|
| 35 |
}
|
| 36 |
|
| 37 |
public function hasRole($rolename){
|
| 38 |
-
return $this->rol->where(nombre_rol)->
|
| 39 |
|
| 40 |
}
|
| 41 |
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
public function hasRole($rolename){
|
| 38 |
+
return $this->rol->where('nombre_rol',$rolenanme)->exists();
|
| 39 |
|
| 40 |
}
|
| 41 |
|