- staging: N/A
- production: https://portal.neurobridges.org/
This is a React application that was based off of RENCI/react-starter.
We're developing with Node v18. Install dependencies with npm ci
. Run development server on port 8080 with npm start
.
Build the application for production with npm run build
. The dist
directory will contain the files bundled with Webpack. This assets in this bundle are what get copied into the release image, so it's a good idea to ensure that the result of build process is what's expected at this stage, before moving on to build Docker images.
Deploying to Sterling.
Before doing anything, determine the next release version. Throughout this section, we'll assume the next version is 1.0.4
.
- Build. Build a release image with the following command, executed from the project root.
To avoid errors on a M1 Mac, build for AMD64 using the following environment variable. More information
export DOCKER_DEFAULT_PLATFORM=linux/amd64
docker build -t containers.renci.org/neurobridges/neurobridges-portal:1.0.4 .
Note: The version tag here,
1.0.4
, must match its occurrences elsewhere in these commands.
- Test. Ensure a container can be spun up from your new image
docker run --rm -p 80:8080 containers.renci.org/neurobridges/neurobridges-portal:1.0.4
The container should be running, and we should see the Search Portal in our browser at http://localhost.
- Push. Push the image to RENCI's image registry.
docker push containers.renci.org/neurobridges/neurobridges-portal:1.0.4
Note: If not already authenticated, log in with
docker login containers.renci.org
.
- Deploy. Update the value of
image.tag
in the filekubernetes/values.yaml
to match the image tag used in the Docker commands above. In our running example, the relevant part ofvalues.yaml
file would need to look like this.
image:
repository: containers.renci.org/neurobridges/neurobridges-portal
tag: "1.0.4"
Deploy the new release with the following command.
helm upgrade --install neurobridges-portal kubernetes -n neurobridges -f kubernetes/values-prod.yaml