Repository for the main UC Davis Datalab website, running Wordpress with the UC Davis Library theme.
https://www.figma.com/file/chC7MLHfapKSRsTXFWNLRs/DataLab?type=design&node-id=371-502&mode=design
To get the site up and running on your machine:
cd deploy
- Make sure you have access to view the Google Cloud secret defined as
GC_READER_KEY_SECRET
. This ensures that you can download necessary third-party plugins and site content. - In the parent directory of this repository, clone all repositories listed in
DEV_REPOS
. These are only needed while doing local development. ./cmds/init-local-dev.sh
./cmds/build-local-dev.sh
./cmds/generate-deployment-files.sh
./cmds/get-env-file.sh dev
to download the env file.- You should have a directory called
datalab-main-site-local-dev
.Enter it, and rundocker compose up -d
If you are using the init/backup utilities, you will need make sure that you have access to the service account secrets. gc-reader-key.json
and gc-writer-key.json
should have content for the init and backup containers, respectively. Keys are fetced in init-local-dev
, but they also have their own dedicated scripts.
All plugins are version-controlled, hosted in a Google Cloud Bucket, and downloaded into the image during the build process. To add a plugin:
- Download and upload the plugin to the Google Cloud Bucket specified in
GC_BUCKET_PLUGINS
. - Add the version to
config.sh
- Add as an environmental variable to
build.sh
- Define zip filename in
Dockerfile
- Define args in
gcloud
andwordpress
builds in Dockerfile - Add to
gsutil cp
command ingcloud
build - Copy, unzip, and rm zip in
wordpress
build - Rebuild the image
- You will still need to go to the Plugins admin page and hit "Activate" or use the wp-cli.