Browse Source
* Rename sandbox to staging * Named manifest * Sort files together * Use a single manifest file * Bump * Host doesn't do anything yet * Add S3 bucket creation to readmepull/243/head
baarkerlounger
3 years ago
committed by
GitHub
10 changed files with 56 additions and 24 deletions
@ -1,4 +1,4 @@ |
|||||||
process.env.NODE_ENV = process.env.NODE_ENV || 'sandbox' |
process.env.NODE_ENV = process.env.NODE_ENV || 'staging' |
||||||
|
|
||||||
const environment = require('./environment') |
const environment = require('./environment') |
||||||
|
|
@ -0,0 +1,21 @@ |
|||||||
|
# Staging |
||||||
|
|
||||||
|
1. Login:\ |
||||||
|
`cf login -a api.london.cloud.service.gov.uk -u <your_username>` |
||||||
|
|
||||||
|
2. Set your deployment target (staging):\ |
||||||
|
`cf target -o dluhc-core -s staging` |
||||||
|
|
||||||
|
3. Create required Postgres and S3 bucket backing services (this will take ~15 mins to finish creating):\ |
||||||
|
`cf create-service postgres tiny-unencrypted-13 dluhc-core-staging-postgres` |
||||||
|
|
||||||
|
`cf create-service aws-s3-bucket default dluhc-core-staging-import-bucket` |
||||||
|
|
||||||
|
`cf create-service aws-s3-bucket default dluhc-core-staging-export-bucket` |
||||||
|
|
||||||
|
`cf bind-service dluhc-core-staging dluhc-core-staging-import-bucket -c '{"permissions": "read-only"}'` |
||||||
|
|
||||||
|
`cf bind-service dluhc-core-staging dluhc-core-staging-export-bucket -c '{"permissions": "read-write"}'` |
||||||
|
|
||||||
|
4. Deploy manifest:\ |
||||||
|
`cf push dluhc-core-staging --strategy rolling` |
@ -1,14 +1,25 @@ |
|||||||
--- |
--- |
||||||
|
defaults: &defaults |
||||||
|
buildpacks: |
||||||
|
- https://github.com/cloudfoundry/ruby-buildpack.git |
||||||
|
processes: |
||||||
|
- type: web |
||||||
|
command: rake db:migrate && bin/rails server |
||||||
|
instances: 2 |
||||||
|
memory: 512M |
||||||
|
|
||||||
applications: |
applications: |
||||||
- name: dluhc-core |
- name: dluhc-core-staging |
||||||
buildpacks: |
<<: *defaults |
||||||
- https://github.com/cloudfoundry/ruby-buildpack.git |
|
||||||
env: |
env: |
||||||
RAILS_ENV: sandbox |
RAILS_ENV: staging |
||||||
processes: |
|
||||||
- type: web |
|
||||||
command: rake db:migrate && bin/rails server |
|
||||||
instances: 2 |
|
||||||
memory: 512M |
|
||||||
services: |
services: |
||||||
- dluhc-core-sandbox-postgres |
- dluhc-core-staging-postgres |
||||||
|
|
||||||
|
- name: dluhc-core-production |
||||||
|
<<: *defaults |
||||||
|
env: |
||||||
|
RAILS_ENV: production |
||||||
|
host: submit-social-housing-lettings-sales-data |
||||||
|
services: |
||||||
|
- dluhc-core-production-postgres |
||||||
|
Loading…
Reference in new issue