From 24118768a348d1d4df028a2cef9a355d3f12284d Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 15 Apr 2025 13:01:12 +0100 Subject: [PATCH] Stripped down config for new site --- am-d-model.env | 10 ----- caddy/Caddyfile | 11 +---- docker-compose.yaml | 26 ++++-------- invenio.cfg | 2 +- invenio.env | 10 +++++ ..._AM-D-Model_logo.webp => I-Form_logo.webp} | Bin invenio_setup.sh | 39 ------------------ prepare-env.sh | 2 +- prettier.config.js | 9 ---- 9 files changed, 21 insertions(+), 88 deletions(-) delete mode 100644 am-d-model.env create mode 100644 invenio.env rename invenio_assets/{ESAFORM_AM-D-Model_logo.webp => I-Form_logo.webp} (100%) delete mode 100644 invenio_setup.sh diff --git a/am-d-model.env b/am-d-model.env deleted file mode 100644 index f99a4e4..0000000 --- a/am-d-model.env +++ /dev/null @@ -1,10 +0,0 @@ -INVENIO_APP_ALLOWED_HOSTS=["invenio.am-d-model.eu"] -INVENIO_S3_ENDPOINT_URL="https://s3.eu-west-1.amazonaws.com" -INVENIO_S3_REGION_NAME="eu-west-1" -INVENIO_S3_BUCKET_NAME="am-d-model-data-repository" -INVENIO_THEME_LOGO="custom_assets/ESAFORM_AM-D-Model_logo.webp" -INVENIO_THEME_FRONTPAGE_TITLE="AM-D-Model Data Repository" -INVENIO_THEME_SITENAME="AMDM Repo" -INVENIO_THEME_FRONTPAGE_SUBTITLE="An Invenio data repository for the AM-D-Model project." -INVENIO_SITE_UI_URL="https://invenio.am-d-model.eu" -INVENIO_SITE_API_URL="https://invenio.am-d-model.eu/api" diff --git a/caddy/Caddyfile b/caddy/Caddyfile index f57f413..ddfc090 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -2,16 +2,7 @@ admin off } -am-d-model.eu { - reverse_proxy site:3000 { - health_uri /health - health_interval 30s - health_timeout 10s - health_status 200 - } -} - -invenio.am-d-model.eu { +invenio.i-form.ie { root /static/* /opt/invenio/var/instance/static try_files {path} {path}/ /index.html reverse_proxy invenio-rdm:5000 diff --git a/docker-compose.yaml b/docker-compose.yaml index 8239ac1..2048565 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,22 +1,12 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json services: - site: - build: . - networks: - - am-d-model-network - expose: - - "3000" - restart: unless-stopped - labels: - - "io.containers.autoupdate=local" - caddy: image: docker.io/library/caddy:latest depends_on: - site - invenio-rdm networks: - - am-d-model-network + - invenio-network ports: - "80:80" - "443:443" @@ -29,7 +19,7 @@ services: invenio-rdm: image: ghcr.io/front-matter/invenio-rdm-starter:v12.0.13.4 networks: - - am-d-model-network + - invenio-network pull_policy: if_not_present volumes: - uploaded_data:/opt/invenio/var/instance/data @@ -132,7 +122,7 @@ services: worker: command: "celery -A invenio_app.celery worker --beat --events --loglevel=WARNING" networks: - - am-d-model-network + - invenio-network image: ghcr.io/front-matter/invenio-rdm-starter:v12.0.13.4 pull_policy: if_not_present volumes: @@ -176,7 +166,7 @@ services: cache: image: valkey/valkey:7.2.5-bookworm networks: - - am-d-model-network + - invenio-network restart: "unless-stopped" volumes: - "valkey_data:/data" @@ -185,7 +175,7 @@ services: db: image: postgres:16.4-bookworm networks: - - am-d-model-network + - invenio-network restart: "unless-stopped" environment: - POSTGRES_USER=${POSTGRES_USER:-inveniordm} @@ -198,7 +188,7 @@ services: search: image: opensearchproject/opensearch:2.12.0 networks: - - am-d-model-network + - invenio-network restart: "unless-stopped" environment: - bootstrap.memory_lock=true @@ -221,8 +211,8 @@ services: - "9600:9600" networks: - am-d-model-network: - name: am-d-model-network + invenio-network: + name: invenio-network volumes: app_data: diff --git a/invenio.cfg b/invenio.cfg index 585cfb4..efe3b69 100644 --- a/invenio.cfg +++ b/invenio.cfg @@ -1,6 +1,6 @@ """ InvenioRDM settings for InvenioRDM Starter project, modified -for the AM-D-Model repository. +for the I-Form data repository. This file was automatically generated by 'invenio-cli init' and manually modified to configure. diff --git a/invenio.env b/invenio.env new file mode 100644 index 0000000..5af8c3c --- /dev/null +++ b/invenio.env @@ -0,0 +1,10 @@ +INVENIO_APP_ALLOWED_HOSTS=["invenio.i-form.ie"] +INVENIO_S3_ENDPOINT_URL="https://s3.eu-west-1.amazonaws.com" +INVENIO_S3_REGION_NAME="eu-west-1" +INVENIO_S3_BUCKET_NAME="i-form-data-repository" +INVENIO_THEME_LOGO="custom_assets/I-Form_logo.webp" +INVENIO_THEME_FRONTPAGE_TITLE="I-Form Data Repository" +INVENIO_THEME_SITENAME="I-Form Repo" +INVENIO_THEME_FRONTPAGE_SUBTITLE="An Invenio data repository for the I-Form research group." +INVENIO_SITE_UI_URL="https://invenio.i-form.ie" +INVENIO_SITE_API_URL="https://invenio.i-form.ie/api" diff --git a/invenio_assets/ESAFORM_AM-D-Model_logo.webp b/invenio_assets/I-Form_logo.webp similarity index 100% rename from invenio_assets/ESAFORM_AM-D-Model_logo.webp rename to invenio_assets/I-Form_logo.webp diff --git a/invenio_setup.sh b/invenio_setup.sh deleted file mode 100644 index 8839613..0000000 --- a/invenio_setup.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -echo "-- Setup InvenioRDM --" - -# Creating database... -invenio db init create - -# Creating files location... -invenio files location create --default s3-default "s3://${INVENIO_S3_BUCKET_NAME}" - -# Creating admin role... -invenio roles create admin - -# Assigning superuser access to admin role... -invenio access allow superuser-access role admin - -# Dropping and re-reating indices... -invenio index destroy --force --yes-i-know -invenio index init - -# Creating custom fields for records... -invenio rdm-records custom-fields init - -# Creating custom fields for communities... -invenio communities custom-fields init - -# Creating rdm fixtures... -invenio rdm-records fixtures - -# Creating demo records... -# invenio rdm-records demo records --user user@demo.org - -# Creating demo communities -# invenio rdm-records demo communities --user community@demo.org - -# Declaring queues... -invenio queues declare - -echo "-- Setup completed --" diff --git a/prepare-env.sh b/prepare-env.sh index 61e6cac..603c424 100755 --- a/prepare-env.sh +++ b/prepare-env.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash aws secretsmanager get-secret-value --secret-id Invenio | \ jq -r '.SecretString | fromjson | to_entries | .[] | .key + "=\"" + .value + "\""' > secrets.env -cat am-d-model.env secrets.env > .env +cat invenio.env secrets.env > .env diff --git a/prettier.config.js b/prettier.config.js index 2972530..e18157b 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -3,15 +3,6 @@ const config = { tabWidth: 4, trailingComma: "all", printWidth: 100, - plugins: ["prettier-plugin-svelte"], - overrides: [ - { - files: "*.svelte", - options: { - parser: "svelte", - }, - }, - ], }; export default config;