To run locally
- Ensure you have docker installed
- Create a local
.env
file (can use.env.example
as a starting point. It's based onconstants.py
) - Run
docker build --no-cache -t h-drive-email .
- Once built, you can start it using
docker run --env-file .env -p 8501:8501 h-drive-email
- Go to
localhost:8501
To quickly get you started in a new namespace, follow these steps.
- In the OpenShift Folder there is a
full_config.yaml
file - Replace the two instances of
<NAMESPACE>
with the namespace you are installing this on (ieabc123-dev
) - In OpenShift, click the
+
button on the top bar - Copy and Paste the YAML file into the page
- Click
Create
which will automatically create all the required components for the application to function:- Deployment
- Service
- Route
- Network Policy
- ImageStream
- Follow the
Github Action Setup
steps below and trigger the workflow. This should then automatically cause the container to start. Since we are using an ImageStream with Auto Redeploy's configured in the Deployment, anytime you trigger the workflow it will automatically redeploy the application.
- Route is configured to require being on a BC Gov Network
- The Environment Variables in OpenShift are in the Deployment.
- The application will automatically restart with the latest image from the last build.yml run
The build.yml github action will build the Dockerfile and push it to the OpenShift ImageStream you have configured. The Deployment in OpenShift is configured to update when there is a new image available so it will restart. Before you can run the workflow, ensure you have these variables and secrets configured in the Repo:
OPENSHIFT_IMAGESTREAM_URL
variable- Looks like:
image-registry.apps.silver.devops.gov.bc.ca/NAMESPACE/
(including -dev, test, prod or tools)
- Looks like:
OPENSHIFT_IMAGESTREAM_USERNAME
secret- You can use the Pipeline user
OPENSHIFT_IMAGESTREAM_TOKEN
secret- You can use the Pipeline Token (From pipeline-token-xxxxxxxx)
Copyright 2025 Province of British Columbia
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.