diff --git a/.bashrc b/.bashrc index 8bb8a8d..a6ab076 100644 --- a/.bashrc +++ b/.bashrc @@ -14,6 +14,11 @@ export SHELL # return # ... and don't do anything else. # fi +expedir_basename="corona_cases" +prjdir=$(pwd) +currdir_basename=$(basename $prjdir) +pgdata=./var/pg/data + if [ -n "$GUIX_ENVIRONMENT" ]; then # /run is not automatically created by guix [ ! -d /run ] && mkdir /run @@ -21,6 +26,13 @@ if [ -n "$GUIX_ENVIRONMENT" ]; then # Quick access to $GUIX_ENVIRONMENT, for usage on config files # (currently only /etc/nginx/nginx.conf) [ ! -L /env ] && ln -s $GUIX_ENVIRONMENT /env + + [ ! -d ./node_modules ] && npm install heroku + + if [ ! -L ./node_modules/heroku/bin/heroku ]; then + ln -s ./node_modules/heroku/bin/run ./node_modules/heroku/bin/heroku + fi + export PATH=$PATH:$prjdir/node_modules/heroku/bin fi # # Link every file in /usr/etc on /etc @@ -29,11 +41,6 @@ fi # [ ! -L $bname ] && ln -s $filepath $bname # done -expedir_basename="corona_cases" -prjdir=$(pwd) -currdir_basename=$(basename $prjdir) -pgdata=./var/pg/data - test_db () { # for long names of keywords, use: # select * from thresholds where kw in ('rec', 'dea', 'act', 'new') order by kw; diff --git a/.heroku-local.env b/.custom.env similarity index 93% rename from .heroku-local.env rename to .custom.env index f551bfe..98c72a1 100644 --- a/.heroku-local.env +++ b/.custom.env @@ -3,7 +3,8 @@ # The value must be one of `(keys corona.envdef/environment)`; # lower-cased and not surrounded by the double quote chars "". -CORONA_ENV_TYPE=local +# CORONA_ENV_TYPE=local +CORONA_ENV_TYPE=devel # https://clojure.org/guides/getting_started#_installation_on_linux CLOJURE_CLI_VERSION=1.11.1.1165 diff --git a/.gitignore b/.gitignore index cae99c9..65db657 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ /resources/mockup/ /var/run/ /log/ +/node_modules/ +/package-lock.json +/package.json +/corona.log diff --git a/Procfile b/Procfile index f472335..cb88ca1 100644 --- a/Procfile +++ b/Procfile @@ -7,4 +7,4 @@ # -Xmx : increase max heap size from default 300MB # Keep in sync with .dir-locals.el and .bashrc -web: java -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Djdk.attach.allowAttachSelf $JVM_OPTS -cp target/corona_cases-standalone.jar clojure.main -m corona.web.core +web: java -Xmx8192m -XX:+HeapDumpOnOutOfMemoryError -Djdk.attach.allowAttachSelf $JVM_OPTS -cp target/corona_cases-standalone.jar clojure.main -m corona.web.core diff --git a/README.md b/README.md index 48e903a..d6f9ef0 100644 --- a/README.md +++ b/README.md @@ -168,9 +168,9 @@ unix_socket_directories = '/tmp' # comma-separated list of directories # start Postgres pg_ctl --pgdata=./var/pg --log=./var/log/postgres.log start # on Guix # pg_ctl --pgdata=./var/pg stop -bin/build; and heroku local --env=.heroku-local.env +bin/build && heroku local --env=.custom.env # or: -# bin/build; and heroku local --env=.heroku-local.env --set COMMIT=... +# bin/build && heroku local --env=.custom.env --set COMMIT=... ``` ## Heroku CI pipeline @@ -195,8 +195,6 @@ psql --dbname=postgres --quiet --file=dbase/my.sql psql --dbname=postgres ``` -```bash -``` then ```postgres -- help diff --git a/manifest.scm b/manifest.scm index 196b02b..28f3376 100644 --- a/manifest.scm +++ b/manifest.scm @@ -101,5 +101,11 @@ sed which + ;; #begin# for heroku installation + (@(gnu packages node) node-lts) + (@(gnu packages python) python) + (@(gnu packages base) gnu-make) ;; i.e. `make` + ;; #end# for heroku installation + (@(gnu packages admin) neofetch) ;; pimp my ride ))