Skip to content
Elemmire edited this page Feb 3, 2022 · 14 revisions

Get the project code

Get the source code from github and move it to a location where it can be handled by the webserver:

git clone git@github.com:Edelweiss/hgv.git
git remote rename origin edelweiss
git checkout --track -b symfony5_aquila edelweiss/symfony5
git submodule update --init --recursive
composer install
sudo cp -r hgv /var/www/aquila
cd /var/www
sudo chown -R $USER:$USER /var/www/aquila

Manually create files and directories that are not under version control

.env

In the project’s root directory create a configuration file called .env

cd /var/www/aquila
vi .env

There you can set the environment and the server secret, and configure the database connection:

APP_ENV=<dev|test|prod>
APP_SECRET=crypticlongsecretnumber
DATABASE_URL="mysql://<USER>:<PASSWORD>@localhost:3306/<DATABASE>?serverVersion=15&charset=utf8"

data

cd /var/www/aquila
mkdir data

The data folder is a lookup directory for pre-rendered HTML pages for DDB texts and HGV translations, and it serves as the source directory for database inputs and manipulations:

  • DDB_EpiDoc_HTML DDB texts
  • HGV_trans_EpiDoc_HTML HGV translations
  • hgv.xml HGV dump file for the initial import (legacy)
  • hgvDelete.csv file for inserting new and updating existing HGV records
  • hgvUpdate.xml file containing fully qualified HGV ids (i.e. TM number + HGV texLett + Mehrfachkennung) that are to be deleted from the database
  • mentionedDate.xml (legacy)

see here how to generate the HTML files

see here how to update the database

vendor

Load and create vendor packages and bundle files by initialising the project using composer:

cd /var/www/aquila
composer install

Setup database and database user

Import table defintions and data and log into dbms:

mysql -u root -p < hgv.sql
mysql -u root -p

Create user and grant privileges:

SELECT User FROM mysql.user;
CREATE USER '<USERNAME>'@localhost IDENTIFIED BY '<PASSWORD>';
GRANT ALL PRIVILEGES ON <DATABASE>.* TO '<USERNAME>'@'localhost' WITH GRANT OPTION;

Clone this wiki locally