From 7c29b53753638542be35db106b0510ec72a8ce3f Mon Sep 17 00:00:00 2001 From: martinjrobins Date: Wed, 10 Jan 2024 10:55:58 +0000 Subject: [PATCH 1/2] #328 remove postgres service in docker compose --- docker-compose.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1d3b0de5..f365db2c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,17 +2,6 @@ version: "2" volumes: db: services: - postgres: - image: "postgres" - stop_signal: SIGINT # Fast Shutdown mode - command: -p 5432 - ports: - - "5432:5432" - env_file: - - ./.env.prod - restart: unless-stopped - volumes: - - db:/var/lib/postgresql/data rabbitmq: image: rabbitmq:3-management-alpine env_file: From 60c13b02cc529d612dcaf060e859746defe99ce2 Mon Sep 17 00:00:00 2001 From: martinjrobins Date: Wed, 10 Jan 2024 14:25:49 +0000 Subject: [PATCH 2/2] #328 add tutorial video csv info to readme --- .env.prod | 1 - README.md | 28 ++++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/.env.prod b/.env.prod index a675a575..10cab564 100644 --- a/.env.prod +++ b/.env.prod @@ -1,7 +1,6 @@ DEBUG=1 HOST_NAME=monkshood SECRET_KEY=aLargeRandomSecretKey -POSTGRES_PASSWORD=sekret2 DATABASE_URL=postgres://postgres:sekret2@postgres:5432/postgres RABBITMQ_DEFAULT_USER=guest diff --git a/README.md b/README.md index 78ba7dcb..9aa9301e 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,16 @@ $ cd pkpdapp ### `.env.prod` file -The configuration of the production application is stored in the `.env.prod` file in the root directory. Edit this file and variables to correspond to your particular setup. The variables are described below: +The configuration of the production application is stored in the `.env.prod` file in the root directory. Edit this file and variables to correspond to your particular setup, in particular make sure `HOST_NAME`, `DATABASE_URL` is set correctly and that `SECRET_KEY` is altered from the default. The variables are described below: - `DEBUG`: set to 0 for production - `HOST_NAME`: the host name of the application - `SECRET_KEY`: a large random string used for cryptographic signing -- `POSTGRES_PASSWORD`: password for postgres database specified in `docker-compose.yml` (not needed if using your own database) -- `DATABASE_URL`: URL of a postgres database (e.g. postgres://username:password@postgres:5432/postgres). Do not alter this if you are using the - postgres service in the `docker-compose.yml` file. +- `DATABASE_URL`: URL of a postgres database (e.g. postgres://username:password@postgres:5432/postgres). Note that any special characters in the password must be url-encoded. E.g. `postgres://user:p#ssword!@localhost/foobar` should be written as `postgres://user:p%23ssword!@localhost/foobar`. + +and should instead be passed as: + + - `RABBITMQ_DEFAULT_USER`: username for rabbitmq server (optional) - `RABBITMQ_DEFAULT_PASS`: password for rabbitmq server (optional) @@ -66,13 +68,19 @@ in the root folder (this folder needs to be created) and named `pkpdapp.crt` and ### PostgreSQL database -The application uses a PostgreSQL database. You can either supply your own -database and set the `DATABASE_URL` variable in the `.env.prod` file, or the -`docker-compose.yml` file contains a postgres service that can be used, along -with the `DATABASE_URL` variable already set in the `.env.prod` file. +The application uses a PostgreSQL database. You should supply your own +database and set the `DATABASE_URL` variable in the `.env.prod` file appropriately. + +### Help pages & Tutorials + +To add tutorial videos to the application, you will need to create a csv file with the following columns (the first line of the csv file should be the column names): + +- `Title`: title of the video +- `Type`: tab in which the video will be displayed (either `Tutorial X` where `X` is a number, `Project`, `Drug`, `Model`, `Trial Design` or `Simulation`) +- `Link`: link to the video +- `Keywords`: keywords associated with the video (optional) -If you are using your own database, you can delete the postgres service from the -`docker-compose.yml` file. +This file should be placed in the `pkpdapp/static/` directory and named `tutorial_videos.csv`. ### Containers