Skip to content

Commit

Permalink
Merge branch '17_schedule_and_swagger' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Thombrix committed Dec 18, 2023
2 parents d6d39ea + b82f291 commit dae0497
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Deploy to Container
on:
push:
branches:
- 13_continuous_integration
- 17_schedule_and_swagger
- main
- dev

jobs:
deploy:
Expand All @@ -25,4 +26,4 @@ jobs:
chmod 600 ~/.ssh/pkey
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/pkey
ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && cd ../frontend-vue && npm install && npm run build"
ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider" && cd ../frontend-vue && npm install && npm run build && (crontab -l && crontab -r) || echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && /usr/local/bin/php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab"
4 changes: 4 additions & 0 deletions backend-laravel/app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class RouteServiceProvider extends ServiceProvider
*/
public function boot(): void
{
if (App::environment() === "production") {
URL::forceScheme("https");
}

RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
Expand Down

0 comments on commit dae0497

Please sign in to comment.