GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DRC-Portals/drc-portals at main · MaayanLab/DRC-Portals

Expand file tree

/

drc-portals

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

drc-portals

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
app
app
 
 
cli
cli
 
 
components
components
 
 
lib
lib
 
 
prisma
prisma
 
 
public
public
 
 
tasks
tasks
 
 
utils
utils
 
 
.dockerignore
.dockerignore
 
 
.env.development
.env.development
 
 
.env.example
.env.example
 
 
.env_pgcontainer
.env_pgcontainer
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
c2m2_summary_count_queries.sql
c2m2_summary_count_queries.sql
 
 
docker-compose.yaml
docker-compose.yaml
 
 
docker-compose_MRM.yaml
docker-compose_MRM.yaml
 
 
docker-compose_MRM_5434.yaml
docker-compose_MRM_5434.yaml
 
 
drop_drc_tables_from_public_schema.sql
drop_drc_tables_from_public_schema.sql
 
 
graphile.config.ts
graphile.config.ts
 
 
mdx-components.tsx
mdx-components.tsx
 
 
next.config.mjs
next.config.mjs
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
postcss.config.js
postcss.config.js
 
 
tailwind.config.ts
tailwind.config.ts
 
 
tsconfig.json
tsconfig.json
 
 

README.md

Outline

DRC Portals Dev Guide

Getting Started

# prepare .env file & review
cp .env.example .env
# start database if not already running
#  (NOTE: If you're running another postgres database on your system, you should turn it off as the ports will conflict)
# This step is not needed if ingesting into the DB on the UCSD DB server as that DB is not in a container
docker-compose up -d drc-portal-postgres
# (advanced) if running elasticsearch locally
docker compose up -d drc-portal-elasticsearch
# install node modules
npm i
# initialize prisma
npx prisma migrate deploy
# run dev server
npm run dev

Open http://localhost:3000 with your browser to see the platform.

The pages will auto-update as you edit the files.

Provisioning the Database

Much of the site is driven by contents of the database, see Provisioning the Database to populate your database with CFDE data.

Pulling New Changes

As the site evolves, changes may be made to the database. For the most part you can update your code base like so:

# If the drc db and public schema already exist, to apply the migrations a fresh and do a clean ingest 
# into the public schema, [without deleting the public schema since that is generally owned by the 
# postgres use4r] delete the existing tables, functions and Types in the public schema
# Below, select the correct server/port/user or use dburl.py
#psql -h [localhost|server] -U [drc|drcadmin] -d drc  -p [5432|5433|5434] -a -f drop_drc_tables_from_public_schema.sql; 
#or, assuming ../database/C2M2 exists
psql "$(python3 ../database/C2M2/dburl.py)" -a -f drop_drc_tables_from_public_schema.sql -L log_drop_drc_public_tables.log; 

# get the latest changes
git pull
# update your database to match any added fields/tables
npx prisma migrate deploy
# then rerun-ingest as during Provisioning the Database above

# if the above doesn't work, you may need to run the below
#  command to completely recreate the database followed
#  by the ingest steps
npx prisma migrate reset

Learn More

To use authentication see the Auth README for more info.

To use prisma (the database) see the Prisma README for more info.

To learn more about Next.js, take a look at the following resources:

  • Next.js Documentation - learn about Next.js features and API.
  • Learn Next.js - an interactive Next.js tutorial.

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Production Deployment to Kubernetes

# configure .env
# initiall install
helm repo add maayanlab https://maayanlab.github.io/helm-charts
helm install drc-portal maayanlab/docker-compose -f <(docker-compose config)

Releasing

# update versions, rebuild, and push docker container for this version
npm version patch

# create git release
VERSION=0.1.x
git add . && git commit -m $VERSION && git tag v$VERSION
git push && git push --tags

# update production (note that we have this in a drc namespace in prod)
helm upgrade -n drc drc-portal maayanlab/docker-compose -f <(docker-compose config)

# broke something? rollback with
helm rollback -n drc drc-portal <CURRENT_REVISION_NUMBER-1>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.