From 70abfe45f51778db1aef8ee491bd8920b8bdfd45 Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Mon, 15 Jan 2024 12:26:22 +0100 Subject: [PATCH] Cleaning up --- .github/workflows/laravel.yml | 2 +- .gitignore | 1 + client/sitemap.js | 1 - config/services.php | 3 -- resources/views/spa.blade.php | 74 ----------------------------------- vapor.yml | 36 ++++++++--------- 6 files changed, 20 insertions(+), 97 deletions(-) delete mode 100644 resources/views/spa.blade.php diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml index deaff2d..08c36c0 100644 --- a/.github/workflows/laravel.yml +++ b/.github/workflows/laravel.yml @@ -212,6 +212,6 @@ jobs: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - name: Deploy to production - run: php vendor/bin/vapor deploy production --commit="${GITHUB_SHA}" --message="${GITHUB_REF}" + run: php vendor/bin/vapor deploy api-production --commit="${GITHUB_SHA}" --message="${GITHUB_REF}" env: VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }} diff --git a/.gitignore b/.gitignore index 798f456..bb797f8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /vendor .env .env.production +.env.api-production .env.backup .env.testing .env.dusk.local diff --git a/client/sitemap.js b/client/sitemap.js index 4591fb2..6dc5405 100644 --- a/client/sitemap.js +++ b/client/sitemap.js @@ -1,7 +1,6 @@ import opnformConfig from "./opnform.config.js"; export default { - // exclude all URLs that start with /secret exclude: ['/settings/**', '/subscriptions/**', '/templates/my-templates'], sources: [ opnformConfig.api_url + '/sitemap-urls' diff --git a/config/services.php b/config/services.php index 7e2b9d1..ad73b8b 100644 --- a/config/services.php +++ b/config/services.php @@ -63,8 +63,5 @@ return [ 'api_key' => env('APPSUMO_API_KEY'), ], - 'google_analytics_code' => env('GOOGLE_ANALYTICS_CODE'), - 'amplitude_code' => env('AMPLITUDE_CODE'), 'crisp_website_id' => env('CRISP_WEBSITE_ID'), - 'sentry_vue_dsn' => env('SENTRY_VUE_DSN'), ]; diff --git a/resources/views/spa.blade.php b/resources/views/spa.blade.php deleted file mode 100644 index 98e8f78..0000000 --- a/resources/views/spa.blade.php +++ /dev/null @@ -1,74 +0,0 @@ -@php - $config = [ - 'appName' => config('app.name'), - 'app_url' => config('app.url'), - 'locale' => $locale = app()->getLocale(), - 'locales' => config('app.locales'), - 'githubAuth' => config('services.github.client_id'), - 'notion' => [ - 'worker' => config('services.notion.worker'), - ], - 'links' => config('links'), - 'production' => App::isProduction(), - 'hCaptchaSiteKey' => config('services.h_captcha.site_key'), - 'google_analytics_code' => config('services.google_analytics_code'), - 'amplitude_code' => config('services.amplitude_code'), - 'sentry_dsn' => config('services.sentry_vue_dsn'), - 'crisp_website_id' => config('services.crisp_website_id'), - 'ai_features_enabled' => !is_null(config('services.openai.api_key')), - 's3_enabled' => config('filesystems.default') === 's3', - 'paid_plans_enabled' => !is_null(config('cashier.key')), - 'custom_domains_enabled' => config('custom-domains.enabled'), - ]; -@endphp - - - - - - - @vite('resources/js/app.js') - - - - @if($meta) - {{$meta['title']}} - - - - - - - - - - - @endif - - - -
- -{{-- Global configuration object --}} - - - -@if($config['google_analytics_code']) - - - -@endif - - - diff --git a/vapor.yml b/vapor.yml index 4da98f9..c699ce2 100644 --- a/vapor.yml +++ b/vapor.yml @@ -5,7 +5,7 @@ ignore: - storage/logs - client environments: - production: + api-production: warm: 5 memory: 1024 cli-memory: 512 @@ -23,20 +23,20 @@ environments: firewall: rate-limit: 1000 timeout: 30 - staging: - memory: 1024 - cli-memory: 512 - cli-timeout: 900 - runtime: 'php-8.2:al2-arm' - storage: opnforms-staging - database: JuPersoDb - domain: stg.opnform.com - build: - - 'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev' - - 'php artisan event:cache' - - 'php artisan disposable:update' - deploy: - - 'php artisan migrate --force' - firewall: - rate-limit: 1000 - timeout: 30 + api-staging: + memory: 1024 + cli-memory: 512 + cli-timeout: 900 + runtime: 'php-8.2:al2-arm' + storage: opnforms-staging + database: JuPersoDb + domain: api.stg.opnform.com + build: + - 'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev' + - 'php artisan event:cache' + - 'php artisan disposable:update' + deploy: + - 'php artisan migrate --force' + firewall: + rate-limit: 1000 + timeout: 30