I have .env file larger than 2000 characters. So I followed the Vapor Doc.
https://docs.vapor.build/projects/environments.html#encrypted-environment-files
I am deploying to environment canary. I have encrypted the .env.canary to .env.canary.encrypted and updated the env on vapor using vapor UI as:
LARAVEL_ENV_ENCRYPTION_KEY=base64:4Tw6Mq+bu8Fq0XvaVRQjazEjkVbV63KAAyYUv7P7TE0=
But after deployment when I run a command php artisan tinker --execute="dump(getenv())" from vapor UI, the content in the .env.canary.encrypted file do not reflect in the command output.
Here is my vapor.yml file:
id: 43299
name: example-project
separate-vendor: true
environments:
canary:
memory: 2048
timeout: 30
domain:
- canary.example.com
database: canary
cli-memory: 1024
runtime: docker
build:
- 'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-interaction --prefer-dist --optimize-autoloader'
- 'php artisan event:cache'
- 'npm i && npm run build && rm -rf node_modules'
deploy:
- 'php artisan migrate --force'
.github/workflows/canary.yml
name: Canary Deployment
on:
push:
branches: [ canary ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none
- name: Require Vapor CLI
run: composer global require laravel/vapor-cli
- name: Install Project Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Deploy Environment
run: vapor deploy canary
env:
VAPOR_API_TOKEN: ${{ secrets.VAPOR_API_TOKEN }}
Can someone figure out what I am doing wrong here? I have multiple environments, so am I missing any environment specific commands in yml file?