Browse Source

renaming database

joel
Simon Bowie 1 year ago
parent
commit
d065d419b8
3 changed files with 8 additions and 8 deletions
  1. +2
    -2
      .env.template
  2. +4
    -4
      database_functions.sh
  3. +2
    -2
      nginx-conf/compendium.conf

+ 2
- 2
.env.template View File

FLASK_RUN_HOST=0.0.0.0 FLASK_RUN_HOST=0.0.0.0
FLASK_DEBUG= FLASK_DEBUG=
SECRET_KEY= SECRET_KEY=
DATABASE_URL=mysql+pymysql://MYSQL_USER:MYSQL_PASSWORD@mariadb/toolkit
DATABASE_URL=mysql+pymysql://MYSQL_USER:MYSQL_PASSWORD@mariadb/compendium
SSL_SCHEME= SSL_SCHEME=


# MariaDB variables # MariaDB variables
MYSQL_ROOT_PASSWORD= MYSQL_ROOT_PASSWORD=
MYSQL_DATABASE=toolkit
MYSQL_DATABASE=compendium
MYSQL_USER=flask MYSQL_USER=flask
MYSQL_PASSWORD= MYSQL_PASSWORD=

+ 4
- 4
database_functions.sh View File

# @creation_date: 2022-11-02 # @creation_date: 2022-11-02
# @license: The MIT License <https://opensource.org/licenses/MIT> # @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk> # @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Runs database functions for the ExPub Compendium
# @purpose: Runs database functions for the Experimental Publishing Compendium
# @acknowledgements: # @acknowledgements:
# https://www.redhat.com/sysadmin/arguments-options-bash-scripts # https://www.redhat.com/sysadmin/arguments-options-bash-scripts


Help() Help()
{ {
# Display Help # Display Help
echo "This script performs database functions for the ExPub Compendium"
echo "This script performs database functions for the Experimental Publishing Compendium"
echo echo
echo "Syntax: database_functions.sh [-l|h|e|i|c|v|d]" echo "Syntax: database_functions.sh [-l|h|e|i|c|v|d]"
echo "options:" echo "options:"


# set variables # set variables
CONTAINER=mariadb CONTAINER=mariadb
DATABASE=toolkit
DATABASE=compendium
USERNAME=xxxxxxxx USERNAME=xxxxxxxx
PASSWORD=xxxxxxxx PASSWORD=xxxxxxxx
EXPORT_DIRECTORY="./db_exports" EXPORT_DIRECTORY="./db_exports"
EXPORT_SQL_FILENAME=toolkit_db_
EXPORT_SQL_FILENAME=compendium_db_
EXPORT_TXT_FILENAME=$2`date +"%Y%m%d"` EXPORT_TXT_FILENAME=$2`date +"%Y%m%d"`


# error message for no flags # error message for no flags

nginx-conf/toolkit.conf → nginx-conf/compendium.conf View File

upstream toolkit {
upstream compendium {
server web:5000; server web:5000;
} }


listen 80; listen 80;


location / { location / {
proxy_pass http://toolkit;
proxy_pass http://compendium;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_redirect off; proxy_redirect off;

Loading…
Cancel
Save