Giter VIP home page Giter VIP logo

siikr's Introduction

Siikr

IYKYK.

Installation

Best done on a clean Ubuntu or debian server.

  1. clone this repo.
  2. Fill out (at a minimum) the first three lines in siikr.conf
  3. If not already in a terminal, switch to one and run chmod +x setup_simple.sh
  4. Then run sudo ./setup_simple.sh and follow the prompts.
  5. Pray.
  6. Submit an issue if it fails.

siikr's People

Contributors

egjoni avatar alekratz avatar

Stargazers

 avatar Julia Hansbrough avatar  avatar wasabipesto avatar

siikr's Issues

siikr_db_setup.sql has hardcoded username for function permission grants

See: https://github.com/EGjoni/Siikr/blob/main/siikr/siikr_db_setup.sql#L942

Since the siikr DB user is specified in the siikr.conf file, it should be reflected in the SQL as well. To fix this, I think it may be worth splitting up the SQL into a static file that has all of the database creation stuff and function definitions, and then a "template" SQL file that uses the environment variables defined in siikr.conf.

So the SQL template file might look something like this:

GRANT ALL ON FUNCTION public.vector_out(public.vector) TO ${pg_user};
GRANT ALL ON FUNCTION public.vector_recv(internal, oid, integer) TO ${pg_user};
-- ...etc

and then doing an envsubst to create this custom file somewhere (and hopefully cleaning it up afterwards)

source "$script_dir/siikr.conf"
template_out="$(mktemp)"
envsubst "$script_dir/siikr/siikr_db_setup_nonstatic.sql" > "$template_out"
psql -U "$pg_user" -d "$siikr_db" -f "$template_out"
rm "$template_out"

Unless there's an easier way to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.