Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

12 Labours Portal Docker Deployment

Docker image

Click image name to see more information for docker images.

Web Portal - 12labours/app-dev:latest

Query Server - 12labours/api-dev:latest

Login System- 12labours/nodejsapi-dev:latest

pgAdmin4 - dpage/pgadmin4

PostgresDB - 12labours/postgres-dev:latest

You can also create your own docker image by forking 12 labours portal related repositories. To find out related repositories, please check Auckland Bioengineering Institute Software or TwelveLaboursDev GitHub.

Environment variables

Create a .env file, copy and paste with following environment variables. (For Ubuntu, remove quote for all environment variables)

PORTAL_URL="http://localhost:3000"
QUERY_API_URL="http://localhost:8000"
LOGIN_API_URL="http://localhost:8080"

# access_token, api_key and secret_key should be set to complex strings
QUERY_ACCESS_TOKEN=
LOGIN_API_KEY=
LOGIN_SECRET_KEY=

GRAPHCMS_ENDPOINT=
GOOGLE_CLIENT_ID=
TWELVE_LABOURS_XML=
// GOOGLE_ANALYTICS_GA4=
FLATMAP_API=


QUERY_SECURE_KEY=

GEN3_ENDPOINT_URL="https://gen3.abi-ctt-ctp.cloud.edu.au"
GEN3_API_KEY=
GEN3_KEY_ID=
GEN3_PUBLIC_ACCESS=

IRODS_HOST="130.216.216.128"
IRODS_PORT="1247"
IRODS_USER=
IRODS_PASSWORD=
IRODS_ZONE="tempZone"
IRODS_ROOT_PATH="/tempZone/home/rods/12L/datasets"

ORTHANC_ENDPOINT_URL="http://130.216.217.175:8042"
ORTHANC_USERNAME=""
ORTHANC_PASSWORD=""


LOGIN_API_PORT="8080"

USER_VERIFY_URL="http://localhost:3000/verify"
GOOGLE_REDIRECT_URI="http://localhost:3000/login/callback"
PASSWORD_RESET_URL="http://localhost:3000/password-reset"

# db_user and db_name better to be the same, will easier to setup web version pgadmin4
# here is an example of db information
DB_HOST="postgresdb"
DB_PORT="5432"
DB_USER=
DB_PASSWORD=
DB_NAME=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SENDGRID_API_KEY=
SENDGRID_VERIFIED_SENDER=

# use your own admin email and password
PGADMIN_DEFAULT_EMAIL=
PGADMIN_DEFAULT_PASSWORD=

Start the docker-compose file

Clone the repo and follow above steps to create env file.

Use following command in the Terminal to start docker images.

$ docker compose up <services name (optional)>

If VSCode is used, install the Docker extension. Right click the docker-compose.yml file, choose Compose Up (- Select Services) command to start docker images.

Setup pgAdmin4 web version

  1. Point your browser to http://localhost:5050

  2. Login with the email and account you used in PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD.

  3. Once logged in, click Add New Server under Quick Links.

  4. Fill the server name.

  5. Go to Connection:

    • Host: Container IPAddress (Run docker ps in terminal, then run docker inspect <postgres container id>, you will find IPAddress)
    • Username: DB_NAME
    • Password: DB_PASSWORD
  6. Now you can find all user data through Databases > 12labours > Schemas > public > Tables or use sql to query data.

Setting update when pgAdmin4 container restarted

If you restart the pgAdmin4 docker container, you cannot open the pgAdmin4 web version directly. When you enter the password, you will get a connection timeout expired error. This is because the container IPAddress is changed every time it restarted. Please follow the steps to fix the setting:

  1. Right click you database server name.
  2. Choose Properties.
  3. Go to Connection.
  4. Repeat Step 5 - Host in Setup pgAdmin4 web version to get current IPAddress.
  5. Replace the IPAddress.
  6. Now you should be able to access your database through pgAdmin4 web again.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors