diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/db.php | 17 | ||||
-rwxr-xr-x | bin/gemini.sh | 11 |
2 files changed, 28 insertions, 0 deletions
@@ -196,6 +196,23 @@ DB::query(<<<SQL SQL); DB::query(<<<SQL + create table if not exists "users_gemini" ( + "id" bigserial primary key, + + "certificate" character varying(255) not null, + + "user_id" bigint not null, + constraint "relation_user" + foreign key ("user_id") references users("id") on delete cascade, + + "created_at" timestamp(0) not null default current_timestamp, + "updated_at" timestamp(0) not null default current_timestamp, + + unique ("certificate") + ); +SQL); + +DB::query(<<<SQL create table if not exists "user_settings" ( "id" bigserial primary key, diff --git a/bin/gemini.sh b/bin/gemini.sh new file mode 100755 index 0000000..5c2a845 --- /dev/null +++ b/bin/gemini.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if ! type entr > /dev/null; then + apk add entr +fi + +openssl req -x509 -newkey rsa:4096 -keyout key.rsa -out cert.pem -days 3650 -nodes -subj "/CN=localhost" + +# php $(pwd)/public/index.php +#find $(pwd) -type f -name '*.php' -o -name '*.twig' +find $(pwd) -type f \( -name "*.php" -o -name "*.twig" \) -not \( -path "*/vendor/*" \) | entr -rn php $(pwd)/public/index.php |