mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
Add staging and init scripts for DB
This commit is contained in:
parent
c273a30047
commit
b24d2e987d
4 changed files with 178 additions and 2 deletions
31
.env.staging
Normal file
31
.env.staging
Normal file
|
@ -0,0 +1,31 @@
|
|||
# This file is actually loaded by Dotenv when RAILS_ENV=development
|
||||
|
||||
RACK_ENV=development
|
||||
RAILS_ENV=development
|
||||
|
||||
APP_SECRET=fe837ea72667ec3d8ecb94cfba1a1bba
|
||||
|
||||
DEPLOY_PATH=/var/www
|
||||
FILES_PATH=/var/www/public/files
|
||||
|
||||
PUMA_WORKERS=0
|
||||
PUMA_MIN_THREADS=1
|
||||
PUMA_MAX_THREADS=16
|
||||
PUMA_PORT=4000
|
||||
|
||||
# Set this to higher to enable debugging
|
||||
PUMA_TIMEOUT=30
|
||||
|
||||
MYSQL_HOST=db
|
||||
MYSQL_DATABASE=ensl_staging
|
||||
MYSQL_USERNAME=ensl
|
||||
MYSQL_PASSWORD=ensl
|
||||
MYSQL_ROOT_PASSWORD=ensl
|
||||
MYSQL_CONNECTION_POOL=32
|
||||
|
||||
NEW_RELIC_APP_NAME=ENSL
|
||||
NEW_RELIC_LICENSE_KEY=
|
||||
|
||||
GOOGLE_API_KEY=
|
||||
GOOGLE_CALENDAR_ID=
|
||||
GOOGLE_CALENDAR=enabled
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,9 +21,8 @@ db_data/*
|
|||
db/data/
|
||||
!db/data/.placeholder
|
||||
db/initdb.d/*
|
||||
!db/initdb.d/*setup.sql
|
||||
!db/initdb.d/.placeholder
|
||||
*.sql*
|
||||
!db/initdb.d/*setup*.sql
|
||||
|
||||
# ignore dkim keys
|
||||
dkim
|
||||
|
|
6
db/initdb.d/ensl.db.setup.sql
Normal file
6
db/initdb.d/ensl.db.setup.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- FIXME: this should be somewhere else probably
|
||||
CREATE DATABASE ensl_test;
|
||||
GRANT ALL PRIVILEGES ON ensl_test.* TO 'ensl'@'%' WITH GRANT OPTION;
|
||||
|
||||
CREATE DATABASE ensl_staging;
|
||||
GRANT ALL PRIVILEGES ON ensl_staging.* TO 'ensl'@'%' WITH GRANT OPTION;
|
140
db/scripts/fix_utf_conversion_errors.sql
Normal file
140
db/scripts/fix_utf_conversion_errors.sql
Normal file
|
@ -0,0 +1,140 @@
|
|||
update `articles` set `text` = replace(`text` ,'É','É');
|
||||
update `articles` set `text` = replace(`text` ,'“','"');
|
||||
update `articles` set `text` = replace(`text` ,'â€','"');
|
||||
update `articles` set `text` = replace(`text` ,'Ç','Ç');
|
||||
update `articles` set `text` = replace(`text` ,'Ã','Ã');
|
||||
update `articles` set `text` = replace(`text` ,'Ã','À');
|
||||
update `articles` set `text` = replace(`text` ,'ú','ú');
|
||||
update `articles` set `text` = replace(`text` ,'•','-');
|
||||
update `articles` set `text` = replace(`text` ,'Ø','Ø');
|
||||
update `articles` set `text` = replace(`text` ,'õ','õ');
|
||||
update `articles` set `text` = replace(`text` ,'Ã','í');
|
||||
update `articles` set `text` = replace(`text` ,'â','â');
|
||||
update `articles` set `text` = replace(`text` ,'ã','ã');
|
||||
update `articles` set `text` = replace(`text` ,'ê','ê');
|
||||
update `articles` set `text` = replace(`text` ,'á','á');
|
||||
update `articles` set `text` = replace(`text` ,'é','é');
|
||||
update `articles` set `text` = replace(`text` ,'ó','ó');
|
||||
update `articles` set `text` = replace(`text` ,'–','–');
|
||||
update `articles` set `text` = replace(`text` ,'ç','ç');
|
||||
update `articles` set `text` = replace(`text` ,'ª','ª');
|
||||
update `articles` set `text` = replace(`text` ,'º','º');
|
||||
update `articles` set `text` = replace(`text` ,'Ã ','à');
|
||||
update `articles` set `text` = replace(`text` ,'ç','ç');
|
||||
update `articles` set `text` = replace(`text` ,'ã','ã');
|
||||
update `articles` set `text` = replace(`text` ,'á','á');
|
||||
update `articles` set `text` = replace(`text` ,'â','â');
|
||||
update `articles` set `text` = replace(`text` ,'é','é');
|
||||
update `articles` set `text` = replace(`text` ,'í','í');
|
||||
update `articles` set `text` = replace(`text` ,'õ','õ');
|
||||
update `articles` set `text` = replace(`text` ,'ú','ú');
|
||||
update `articles` set `text` = replace(`text` ,'ç','ç');
|
||||
update `articles` set `text` = replace(`text` ,'Á','Á');
|
||||
update `articles` set `text` = replace(`text` ,'Â','Â');
|
||||
update `articles` set `text` = replace(`text` ,'É','É');
|
||||
update `articles` set `text` = replace(`text` ,'Í','Í');
|
||||
update `articles` set `text` = replace(`text` ,'Õ','Õ');
|
||||
update `articles` set `text` = replace(`text` ,'Ú','Ú');
|
||||
update `articles` set `text` = replace(`text` ,'Ç','Ç');
|
||||
update `articles` set `text` = replace(`text` ,'Ã','Ã');
|
||||
update `articles` set `text` = replace(`text` ,'À','À');
|
||||
update `articles` set `text` = replace(`text` ,'Ê','Ê');
|
||||
update `articles` set `text` = replace(`text` ,'Ó','Ó');
|
||||
update `articles` set `text` = replace(`text` ,'Ô','Ô');
|
||||
update `articles` set `text` = replace(`text` ,'Ü','Ü');
|
||||
update `articles` set `text` = replace(`text` ,'ã','ã');
|
||||
update `articles` set `text` = replace(`text` ,'à','à');
|
||||
update `articles` set `text` = replace(`text` ,'ê','ê');
|
||||
update `articles` set `text` = replace(`text` ,'ó','ó');
|
||||
update `articles` set `text` = replace(`text` ,'ô','ô');
|
||||
update `articles` set `text` = replace(`text` ,'ü','ü');
|
||||
update `articles` set `text` = replace(`text` ,'&','&');
|
||||
update `articles` set `text` = replace(`text` ,'>','>');
|
||||
update `articles` set `text` = replace(`text` ,'<','<');
|
||||
update `articles` set `text` = replace(`text` ,'ˆ','ˆ');
|
||||
update `articles` set `text` = replace(`text` ,'˜','˜');
|
||||
update `articles` set `text` = replace(`text` ,'¨','¨');
|
||||
update `articles` set `text` = replace(`text` ,'&cute;','´');
|
||||
update `articles` set `text` = replace(`text` ,'¸','¸');
|
||||
update `articles` set `text` = replace(`text` ,'"','"');
|
||||
update `articles` set `text` = replace(`text` ,'“','“');
|
||||
update `articles` set `text` = replace(`text` ,'”','”');
|
||||
update `articles` set `text` = replace(`text` ,'‘','‘');
|
||||
update `articles` set `text` = replace(`text` ,'’','’');
|
||||
update `articles` set `text` = replace(`text` ,'‹','‹');
|
||||
update `articles` set `text` = replace(`text` ,'›','›');
|
||||
update `articles` set `text` = replace(`text` ,'«','«');
|
||||
update `articles` set `text` = replace(`text` ,'»','»');
|
||||
update `articles` set `text` = replace(`text` ,'º','º');
|
||||
update `articles` set `text` = replace(`text` ,'ª','ª');
|
||||
update `articles` set `text` = replace(`text` ,'–','–');
|
||||
update `articles` set `text` = replace(`text` ,'—','—');
|
||||
update `articles` set `text` = replace(`text` ,'¯','¯');
|
||||
update `articles` set `text` = replace(`text` ,'…','…');
|
||||
update `articles` set `text` = replace(`text` ,'¦','¦');
|
||||
update `articles` set `text` = replace(`text` ,'•','•');
|
||||
update `articles` set `text` = replace(`text` ,'¶','¶');
|
||||
update `articles` set `text` = replace(`text` ,'§','§');
|
||||
update `articles` set `text` = replace(`text` ,'¹','¹');
|
||||
update `articles` set `text` = replace(`text` ,'²','²');
|
||||
update `articles` set `text` = replace(`text` ,'³','³');
|
||||
update `articles` set `text` = replace(`text` ,'½','½');
|
||||
update `articles` set `text` = replace(`text` ,'¼','¼');
|
||||
update `articles` set `text` = replace(`text` ,'¾','¾');
|
||||
update `articles` set `text` = replace(`text` ,'⅛','⅛');
|
||||
update `articles` set `text` = replace(`text` ,'⅜','⅜');
|
||||
update `articles` set `text` = replace(`text` ,'⅝','⅝');
|
||||
update `articles` set `text` = replace(`text` ,'⅞','⅞');
|
||||
update `articles` set `text` = replace(`text` ,'>','>');
|
||||
update `articles` set `text` = replace(`text` ,'<','<');
|
||||
update `articles` set `text` = replace(`text` ,'±','±');
|
||||
update `articles` set `text` = replace(`text` ,'−','−');
|
||||
update `articles` set `text` = replace(`text` ,'×','×');
|
||||
update `articles` set `text` = replace(`text` ,'÷','÷');
|
||||
update `articles` set `text` = replace(`text` ,'∗','∗');
|
||||
update `articles` set `text` = replace(`text` ,'⁄','⁄');
|
||||
update `articles` set `text` = replace(`text` ,'‰','‰');
|
||||
update `articles` set `text` = replace(`text` ,'∫','∫');
|
||||
update `articles` set `text` = replace(`text` ,'∑','∑');
|
||||
update `articles` set `text` = replace(`text` ,'∏','∏');
|
||||
update `articles` set `text` = replace(`text` ,'√','√');
|
||||
update `articles` set `text` = replace(`text` ,'∞','∞');
|
||||
update `articles` set `text` = replace(`text` ,'≈','≈');
|
||||
update `articles` set `text` = replace(`text` ,'≅','≅');
|
||||
update `articles` set `text` = replace(`text` ,'∝','∝');
|
||||
update `articles` set `text` = replace(`text` ,'≡','≡');
|
||||
update `articles` set `text` = replace(`text` ,'≠','≠');
|
||||
update `articles` set `text` = replace(`text` ,'≤','≤');
|
||||
update `articles` set `text` = replace(`text` ,'≥','≥');
|
||||
update `articles` set `text` = replace(`text` ,'∴','∴');
|
||||
update `articles` set `text` = replace(`text` ,'⋅','⋅');
|
||||
update `articles` set `text` = replace(`text` ,'·','·');
|
||||
update `articles` set `text` = replace(`text` ,'∂','∂');
|
||||
update `articles` set `text` = replace(`text` ,'ℑ','ℑ');
|
||||
update `articles` set `text` = replace(`text` ,'ℜ','ℜ');
|
||||
update `articles` set `text` = replace(`text` ,'′','′');
|
||||
update `articles` set `text` = replace(`text` ,'″','″');
|
||||
update `articles` set `text` = replace(`text` ,'°','°');
|
||||
update `articles` set `text` = replace(`text` ,'∠','∠');
|
||||
update `articles` set `text` = replace(`text` ,'⊥','⊥');
|
||||
update `articles` set `text` = replace(`text` ,'∇','∇');
|
||||
update `articles` set `text` = replace(`text` ,'⊕','⊕');
|
||||
update `articles` set `text` = replace(`text` ,'⊗','⊗');
|
||||
update `articles` set `text` = replace(`text` ,'ℵ','ℵ');
|
||||
update `articles` set `text` = replace(`text` ,'ø','ø');
|
||||
update `articles` set `text` = replace(`text` ,'Ø','Ø');
|
||||
update `articles` set `text` = replace(`text` ,'∈','∈');
|
||||
update `articles` set `text` = replace(`text` ,'∉','∉');
|
||||
update `articles` set `text` = replace(`text` ,'∩','∩');
|
||||
update `articles` set `text` = replace(`text` ,'∪','∪');
|
||||
update `articles` set `text` = replace(`text` ,'⊂','⊂');
|
||||
update `articles` set `text` = replace(`text` ,'⊃','⊃');
|
||||
update `articles` set `text` = replace(`text` ,'⊆','⊆');
|
||||
update `articles` set `text` = replace(`text` ,'⊇','⊇');
|
||||
update `articles` set `text` = replace(`text` ,'∃','∃');
|
||||
update `articles` set `text` = replace(`text` ,'∀','∀');
|
||||
update `articles` set `text` = replace(`text` ,'∅','∅');
|
||||
update `articles` set `text` = replace(`text` ,'¬','¬');
|
||||
update `articles` set `text` = replace(`text` ,'∧','∧');
|
||||
update `articles` set `text` = replace(`text` ,'∨','∨');
|
||||
update `articles` set `text` = replace(`text` ,'↵','↵');
|
Loading…
Reference in a new issue