diff --git a/.env.example b/.env.example deleted file mode 100644 index eae5060..0000000 --- a/.env.example +++ /dev/null @@ -1,7 +0,0 @@ -POSTGRES_DB=index -POSTGRES_USER=index -POSTGRES_PASSWORD= - -DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}?sslmode=disable" - -SQLPAGE_WEB_ROOT=app diff --git a/.justfile b/.justfile index 9686466..04b421f 100644 --- a/.justfile +++ b/.justfile @@ -11,5 +11,3 @@ dev: docker compose up --watch dbmate +ARGS: (compose-exec "index dbmate" ARGS) - -migrate: (dbmate "migrate") diff --git a/docker/Dockerfile b/docker/Dockerfile index d9229e9..b5af08e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,6 +2,7 @@ FROM ghcr.io/linuxcontainers/debian-slim:latest COPY --from=ghcr.io/amacneil/dbmate /usr/local/bin/dbmate /usr/local/bin/dbmate COPY --from=lovasoa/sqlpage:latest /usr/local/bin/sqlpage /usr/local/bin/sqlpage +COPY --from=lovasoa/sqlpage:latest /lib/libgcc_s.so.1 /lib/libgcc_s.so.1 WORKDIR /app diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index efb80cc..799130e 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -17,8 +17,3 @@ services: db: image: postgres:17 env_file: ../.env - volumes: - - db_data:/var/lib/postgresql/data - -volumes: - db_data: diff --git a/src/app/index.sql b/src/app/index.sql deleted file mode 100644 index 0d98893..0000000 --- a/src/app/index.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT 'dynamic' AS component, sqlpage.read_file_as_text('../shared/shell.json') AS properties; diff --git a/src/app/sources/index.sql b/src/app/sources/index.sql deleted file mode 100644 index 2c65a84..0000000 --- a/src/app/sources/index.sql +++ /dev/null @@ -1,47 +0,0 @@ -SELECT - 'dynamic' AS component, - sqlpage.read_file_as_text('../shared/shell.json') AS properties; - --- ╭─────────────────────────────────────────────────────────╮ --- │ Form │ --- ╰─────────────────────────────────────────────────────────╯ -SELECT - 'form' AS component, - 'sources/create.sql' AS ACTION, - 'Save' AS validate, - 'Sources' AS title; - -SELECT - 'name' AS name, - 'Name' AS label, - 8 AS width, - TRUE AS required; - -SELECT - 'uid' AS name, - 'Identifier' AS label, - 4 AS width, - 5 AS maxlength, - 1 AS minlength, - TRUE AS required; - -SELECT - 'uri' AS name, - 'URI' AS label, - TRUE AS required; - -INSERT INTO - public.sources(name, uid, uri) -VALUES - (:name, :uid, :uri); - --- ╭─────────────────────────────────────────────────────────╮ --- │ Table list │ --- ╰─────────────────────────────────────────────────────────╯ -SELECT - 'table' AS component; - -SELECT - * -FROM - public.sources; diff --git a/src/index.sql b/src/index.sql new file mode 100644 index 0000000..3886b29 --- /dev/null +++ b/src/index.sql @@ -0,0 +1,6 @@ +SELECT 'list' AS component, + 'Popular websites TESTOOO' AS title; + +SELECT 'Hello' AS title, + 'world' AS description, + 'https://wikipedia.org' AS link; diff --git a/src/shared/shell.json b/src/shared/shell.json deleted file mode 100644 index 27da355..0000000 --- a/src/shared/shell.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "component": "shell", - "title": "Index", - "link": "/", - "layout": "boxed", - "theme": "dark", - "menu_item": [ - { "link": "index.sql", "title": "Home" }, - { - "title": "Dependencies", - "icon": "brand-stackshare", - "submenu": [ - { - "link": "/sources/index.sql", - "title": "Sources", - "icon": "external-link" - } - ] - } - ] -}