diff --git a/homepage/cwsvJudo/.gitignore b/homepage/cwsvJudo/.gitignore index 6bb3749..d80be2e 100644 --- a/homepage/cwsvJudo/.gitignore +++ b/homepage/cwsvJudo/.gitignore @@ -8,3 +8,5 @@ node_modules # don't commit any secrets Makefile.local +db_root_password.txt +db_password.txt diff --git a/homepage/cwsvJudo/Makefile.heliohost b/homepage/cwsvJudo/Makefile.heliohost index 8fbfb07..32b4c85 100644 --- a/homepage/cwsvJudo/Makefile.heliohost +++ b/homepage/cwsvJudo/Makefile.heliohost @@ -15,7 +15,7 @@ configFiles = $(wildcard config/*.php) LN = ln -f .PHONY: all -all: build/css/cwsvJudo.css pages images +all: build/css/cwsvJudo.css images # @todo This should only be temporary. Better outsource the graphics to it's own Makefile. make -j graphiken make build/css/cwsvJudo.css @@ -29,9 +29,6 @@ build/graphiken/wallpapers/%.svg: graphiken/wallpapers/%.svg .PHONY: images images: $(wallpapers) - echo $(wallpapersSrc) - echo $(wallpapers) - .PHONY: clean clean: @@ -83,17 +80,11 @@ dist: all $(LN) ./submodules/lazysizes/lazysizes.min.js $(distDir)/httpdocs/ressourcen/js/ # page data - mkdir -p $(distDir)/httpdocs/pages/responsive - find ./build/materialize/ -type f -exec $(LN) {} $(distDir)/httpdocs/pages/responsive \; - mkdir -p $(distDir)/httpdocs/pages/shared - find ./src/shared/ -type f -exec $(LN) {} $(distDir)/httpdocs/pages/shared \; - -# testing/development pages - mkdir -p $(distDevPages) - mkdir -p $(distDevPages)/phpLibs/cwsvJudo - - find src/pages/test -type f -exec $(LN) {} $(distDevPages) \; - find src/pages/test/phpLibs/cwsvJudo -type f -exec $(LN) {} $(distDevPages)/phpLibs/cwsvJudo \; + mkdir -p $(distWebRoot)/pages/responsive + find src/pages/responsive -type f -exec $(LN) {} $(distWebRoot)/pages/responsive \; + + mkdir -p $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo + find src/pages/responsive/phpLibs/cwsvJudo -type f -exec $(LN) {} $(distWebRoot)/pages/responsive/phpLibs/cwsvJudo \; # structured data mkdir -p $(distDir)/httpdocs/ressourcen/structuredData/json @@ -194,6 +185,6 @@ build/css/cwsvJudo.css: $(cssFiles) # curl .PHONY: upload -upload: all +upload: dist lftp -f scripts/upload-heliohost diff --git a/homepage/cwsvJudo/configs/heliohost/config.json b/homepage/cwsvJudo/configs/heliohost/config.json index c9cbb9b..1ed5bc7 100644 --- a/homepage/cwsvJudo/configs/heliohost/config.json +++ b/homepage/cwsvJudo/configs/heliohost/config.json @@ -1,7 +1,7 @@ { "cwsvJudo": { "db": { - "host": "db", + "host": "localhost", "name": "cwsvjudo_main", "user": "cwsvjudo_marko" } diff --git a/homepage/cwsvJudo/configs/localDocker/config.json b/homepage/cwsvJudo/configs/localDocker/config.json new file mode 100644 index 0000000..c9cbb9b --- /dev/null +++ b/homepage/cwsvJudo/configs/localDocker/config.json @@ -0,0 +1,9 @@ +{ + "cwsvJudo": { + "db": { + "host": "db", + "name": "cwsvjudo_main", + "user": "cwsvjudo_marko" + } + } +} \ No newline at end of file diff --git a/homepage/cwsvJudo/configs/localDocker/secrets.json b/homepage/cwsvJudo/configs/localDocker/secrets.json new file mode 100644 index 0000000..aecb80c --- /dev/null +++ b/homepage/cwsvJudo/configs/localDocker/secrets.json @@ -0,0 +1,7 @@ +{ + "cwsvJudo": { + "db": { + "cwsvjudo_marko": "kodokan" + } + } +} \ No newline at end of file diff --git a/homepage/cwsvJudo/docker-compose.yaml b/homepage/cwsvJudo/docker-compose.yaml index f44b248..9a732a0 100644 --- a/homepage/cwsvJudo/docker-compose.yaml +++ b/homepage/cwsvJudo/docker-compose.yaml @@ -15,7 +15,8 @@ services: volumes: # this line maps the content of ./html in your pc to the /var/www/html of the container - ./build/dist/heliohost/httpdocs:/var/www/html - - ./build/dist/heliohost/:/home/cwsvjudo.helioho.st/ + - ./configs/localDocker/config.json:/home/cwsvjudo.de/.local/config.json + - ./configs/localDocker/secrets.json:/home/cwsvjudo.de/.local/secrets.json db: # check the mysql version you need for your project image: mariadb:latest diff --git a/homepage/cwsvJudo/scripts/upload-heliohost b/homepage/cwsvJudo/scripts/upload-heliohost index d613f92..0a2b787 100644 --- a/homepage/cwsvJudo/scripts/upload-heliohost +++ b/homepage/cwsvJudo/scripts/upload-heliohost @@ -1,27 +1,11 @@ #! /usr/bin/env bash -open cwsvjudo.helioho.st +open cwsvjudo.de user cwsvjudo CTI/eiT4RYe6?ac5 # @todo enable ssl check set ssl:verify-certificate no set ftp:ssl-allow off # upload: -# - page data -mirror --verbose --continue --parallel=8 --reverse ./build/materialize /httpdocs/pages/responsive -# - php lib -mirror --verbose --continue --parallel=8 --reverse ./phpLib/cwsvJudo /httpdocs/ressourcen/phpLib/cwsvJudo -# - graphics -mirror --verbose --continue --parallel=8 --reverse ./build/graphiken /httpdocs/ressourcen/graphiken -mirror --verbose --continue --parallel=8 --reverse ./graphiken/banner /httpdocs/ressourcen/graphiken/banner -put build/graphiken/favIcons/favicon.ico -o /httpdocs/favicon.ico -# - css -mkdir -pf /httpdocs/ressourcen/css -put build/css/cwsvJudo.css -o /httpdocs/ressourcen/css/cwsvJudo.css -# - fonts -mirror --verbose --continue --parallel=8 --reverse ./res/fonts /httpdocs/ressourcen/fonts -# config files -put configs/heliohost/pages.config.inc.php -o /httpdocs/pages/responsive/config.inc.php -# @todo shouldn't be used any more -mkdir -pf /.local +mirror --verbose --continue --parallel=8 --reverse ./build/dist/heliohost / put configs/heliohost/db.config.php -o /.local/db.config.php # exit diff --git a/homepage/cwsvJudo/src/pages/test/bootstrap.php b/homepage/cwsvJudo/src/pages/responsive/bootstrap.php similarity index 100% rename from homepage/cwsvJudo/src/pages/test/bootstrap.php rename to homepage/cwsvJudo/src/pages/responsive/bootstrap.php diff --git a/homepage/cwsvJudo/src/pages/test/config.php b/homepage/cwsvJudo/src/pages/responsive/config.php similarity index 79% rename from homepage/cwsvJudo/src/pages/test/config.php rename to homepage/cwsvJudo/src/pages/responsive/config.php index 3dc31f3..8fb4fc5 100644 --- a/homepage/cwsvJudo/src/pages/test/config.php +++ b/homepage/cwsvJudo/src/pages/responsive/config.php @@ -3,4 +3,4 @@ * home directory on the server * - meaning the users home directory (aka ~) in the environment, not the directory served via http */ -$home = "/home/cwsvjudo.helioho.st"; +$home = "/home/cwsvjudo.de"; diff --git a/homepage/cwsvJudo/src/pages/test/index.php b/homepage/cwsvJudo/src/pages/responsive/index.php similarity index 97% rename from homepage/cwsvJudo/src/pages/test/index.php rename to homepage/cwsvJudo/src/pages/responsive/index.php index 603f25b..e4fcbd3 100644 --- a/homepage/cwsvJudo/src/pages/test/index.php +++ b/homepage/cwsvJudo/src/pages/responsive/index.php @@ -19,8 +19,8 @@ $sections = [ dbHandle: $dbHandle, options: [ "limit" => 6, - // "dbCharset" => "ISO-8859-1", - "dbCharset" => "UTF-8", + "dbCharset" => "ISO-8859-1", + // "dbCharset" => "UTF-8", // "outCharset" => "ISO-8859-1", "outCharset" => "UTF-8", ] @@ -84,7 +84,7 @@ function main($sections, $wallpapers) ">" . "" . ""; - echo '
" . $this->content . - "
" . "