瀏覽代碼

renaming database

joel
Simon Bowie 1 年之前
父節點
當前提交
d065d419b8
共有 3 個檔案被更改,包括 8 行新增8 行删除
  1. +2
    -2
      .env.template
  2. +4
    -4
      database_functions.sh
  3. +2
    -2
      nginx-conf/compendium.conf

+ 2
- 2
.env.template 查看文件

@@ -5,11 +5,11 @@ FLASK_APP=app
FLASK_RUN_HOST=0.0.0.0
FLASK_DEBUG=
SECRET_KEY=
DATABASE_URL=mysql+pymysql://MYSQL_USER:MYSQL_PASSWORD@mariadb/toolkit
DATABASE_URL=mysql+pymysql://MYSQL_USER:MYSQL_PASSWORD@mariadb/compendium
SSL_SCHEME=

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

+ 4
- 4
database_functions.sh 查看文件

@@ -3,7 +3,7 @@
# @creation_date: 2022-11-02
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @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:
# https://www.redhat.com/sysadmin/arguments-options-bash-scripts

@@ -24,7 +24,7 @@ License()
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 "Syntax: database_functions.sh [-l|h|e|i|c|v|d]"
echo "options:"
@@ -72,11 +72,11 @@ Drop_table()

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

# error message for no flags

nginx-conf/toolkit.conf → nginx-conf/compendium.conf 查看文件

@@ -1,4 +1,4 @@
upstream toolkit {
upstream compendium {
server web:5000;
}

@@ -7,7 +7,7 @@ server {
listen 80;

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

Loading…
取消
儲存