diff --git a/Procfile b/Procfile index da552c0..6cf46a6 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,3 @@ -web: vendor/bin/heroku-php-nginx -C nginx.conf public/ +web: vendor/bin/heroku-php-nginx -C environment/prod/nginx.conf public/ release: php artisan migrate --force && php artisan cache:clear && php artisan config:cache worker: php artisan queue:work diff --git a/app/Infrastructure/Http/Controllers/DashboardController.php b/app/Infrastructure/Http/Controllers/DashboardController.php index 05b13ea..f215a93 100644 --- a/app/Infrastructure/Http/Controllers/DashboardController.php +++ b/app/Infrastructure/Http/Controllers/DashboardController.php @@ -50,7 +50,7 @@ class DashboardController extends Controller $holidays = Holiday::query() ->whereDate("date", ">=", $now) - ->latest() + ->orderBy("date") ->limit(3) ->get(); diff --git a/docker-compose.yml b/docker-compose.yml index 6a4231b..6e14c5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: container_name: toby-web working_dir: /application volumes: - - ./docker/dev/nginx/nginx.conf:/etc/nginx/conf.d/default.conf + - ./environment/dev/nginx/nginx.conf:/etc/nginx/conf.d/default.conf - .:/application networks: - toby-dev @@ -19,7 +19,7 @@ services: php: build: - context: docker/dev/php + context: environment/dev/php args: INSTALL_XDEBUG: ${DOCKER_INSTALL_XDEBUG:-false} container_name: toby-php @@ -27,7 +27,7 @@ services: user: ${CURRENT_UID:-1000} volumes: - .:/application - - ./docker/dev/php/php.ini:/usr/local/etc/php/conf.d/php.ini + - ./environment/dev/php/php.ini:/usr/local/etc/php/conf.d/php.ini networks: - toby-dev extra_hosts: diff --git a/docker/dev/nginx/nginx.conf b/environment/dev/nginx/nginx.conf similarity index 100% rename from docker/dev/nginx/nginx.conf rename to environment/dev/nginx/nginx.conf diff --git a/docker/dev/php/Dockerfile b/environment/dev/php/Dockerfile similarity index 100% rename from docker/dev/php/Dockerfile rename to environment/dev/php/Dockerfile diff --git a/docker/dev/php/php.ini b/environment/dev/php/php.ini similarity index 100% rename from docker/dev/php/php.ini rename to environment/dev/php/php.ini diff --git a/nginx.conf b/environment/prod/nginx.conf similarity index 99% rename from nginx.conf rename to environment/prod/nginx.conf index b03455d..48da7e3 100644 --- a/nginx.conf +++ b/environment/prod/nginx.conf @@ -7,4 +7,4 @@ location / { } location @rewriteapp { rewrite ^(.*)$ /index.php$1 last; -} \ No newline at end of file +} diff --git a/readme.md b/readme.md index f981e88..423afa1 100644 --- a/readme.md +++ b/readme.md @@ -60,7 +60,7 @@ Directory structure little differs from a standard Laravel tree. We decided to r - **web** - nginx HTTP server - **php** - php and composer stuff - **node** - npm stuff -- **mysql** - database for local development +- **pgsql** - database for local development - **mailhog** - for emails preview ### Running tests diff --git a/routes/web.php b/routes/web.php index c3505ad..e468d78 100644 --- a/routes/web.php +++ b/routes/web.php @@ -65,6 +65,12 @@ Route::middleware("auth")->group(function (): void { ->name("year-periods.select"); }); + +Route::get("/dupa", function () { + \Toby\Infrastructure\Jobs\CheckYearPeriod::dispatchSync(); +}); + + Route::middleware("guest")->group(function (): void { Route::get("login", fn() => inertia("Login")) ->name("login");