mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
DEVOPS: scripting for deployment to gcloud storage
This commit is contained in:
parent
a55d21e306
commit
7a91bb42ba
18
src/Makefile
Normal file
18
src/Makefile
Normal file
@ -0,0 +1,18 @@
|
||||
output := dist/dynamicbible/
|
||||
|
||||
test:
|
||||
npm run-script test-headless
|
||||
|
||||
# For some reason karma is unable to connect to the browser here.
|
||||
# I don't want to debug so not using test as a dependency.
|
||||
build: test
|
||||
npm run-script build
|
||||
|
||||
deploy-prod: build
|
||||
gsutil -m rsync -d -r ${output} gs://dynamicbible.com
|
||||
|
||||
deploy-staging: build
|
||||
gsutil -m rsync -d -r ${output} gs://staging.dynamicbible.com
|
||||
|
||||
update-bucket-configs: gcloud/buckets.yaml
|
||||
gcloud deployment-manager deployments update dynamicbible-buckets --config gcloud/buckets.yaml
|
49
src/gcloud/buckets.yaml
Normal file
49
src/gcloud/buckets.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
---
|
||||
resources:
|
||||
- name: staging.dynamicbible.com
|
||||
type: storage.v1.bucket
|
||||
properties:
|
||||
bucket: staging.dynamicbible.com
|
||||
project: "dynamicbible-7c6cf"
|
||||
location: "us-east1"
|
||||
website:
|
||||
notFoundPage: 404.html
|
||||
mainPageSuffix: index.html
|
||||
acl:
|
||||
- entity: "project-owners-dynamicbible-7c6cf"
|
||||
role: OWNER
|
||||
- entity: "project-editors-dynamicbible-7c6cf"
|
||||
role: WRITER
|
||||
- entity: "project-viewers-dynamicbible-7c6cf"
|
||||
role: READER
|
||||
defaultObjectAcl:
|
||||
- entity: allUsers
|
||||
role: READER
|
||||
# - name: dynamicbible.com
|
||||
# type: storage.v1.bucket
|
||||
# properties:
|
||||
# bucket: dynamicbible.com
|
||||
# project: "dynamicbible-7c6cf"
|
||||
# location: "us-east1"
|
||||
# website:
|
||||
# notFoundPage: 404.html
|
||||
# mainPageSuffix: index.html
|
||||
# acl:
|
||||
# - entity: "project-owners-dynamicbible-7c6cf"
|
||||
# role: OWNER
|
||||
# - entity: "project-editors-dynamicbible-7c6cf"
|
||||
# role: WRITER
|
||||
# - entity: "project-viewers-dynamicbible-7c6cf"
|
||||
# role: READER
|
||||
# defaultObjectAcl:
|
||||
# - entity: allUsers
|
||||
# role: READER
|
||||
outputs:
|
||||
#- name: dynamicbible.comselfLink
|
||||
# value: "https://console.cloud.google.com/storage/browser/dynamicbible.com"
|
||||
#- name: dynamicbible.comgsLink
|
||||
# value: "gs://dynamicbible.com"
|
||||
- name: staging.dynamicbible.comselfLink
|
||||
value: "https://console.cloud.google.com/storage/browser/staging.dynamicbible.com"
|
||||
- name: staging.dynamicbible.comgsLink
|
||||
value: "gs://staging.dynamicbible.com"
|
Loading…
x
Reference in New Issue
Block a user