Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snowfire/vapor-on-different-environments
Use separate AWS accounts for staging and production on Laravel Vapor
https://github.com/snowfire/vapor-on-different-environments
Last synced: about 9 hours ago
JSON representation
Use separate AWS accounts for staging and production on Laravel Vapor
- Host: GitHub
- URL: https://github.com/snowfire/vapor-on-different-environments
- Owner: snowfire
- Created: 2020-07-15T13:07:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T12:08:53.000Z (about 4 years ago)
- Last Synced: 2024-08-03T09:06:57.490Z (3 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 14
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Use separate staging/production AWS accounts for a Laravel Vapor project
These scripts allows you to use separate AWS account for your staging and production environments.
## How it works
1. Create two teams on Vapor (`App Production` and `App Staging`). Each team has their own AWS credentials.
2. Create a project inside `App production` (https://docs.vapor.build/1.0/projects/the-basics.html#creating-projects)
3. Rename `vapor.yml` to `vapor.production.yml`
4. Run `vapor team:switch`, switch to `App Staging` and create a new Vapor project
5. Rename `vapor.yml` to `vapor.staging.yml`
6. In Vapor `App Production` delete the staging environment, and in `App Staging` delete the production environmentNow you have two projects on Vapor in different teams connected to different AWS accounts.
Copy `vapor.sh` and `deploy.sh` from this project and throw them in the root of your projects.
## Interact with Vapor trough scripts
Change the .env file:
```
./vapor.sh staging env:pull staging
./vapor.sh staging env:push staging
```Deploy:
```
./deploy.sh staging
```