From 5f57c946a24e05666f4a2946e3065f2a4b1fad4d Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Wed, 15 Jul 2026 21:40:15 +0100 Subject: [PATCH] Fixed deployment bugs --- i-form-data-repository/site/setup.cfg | 3 + index.html | 443 ++++++++++++++++++++++++++ justfile | 33 +- 3 files changed, 466 insertions(+), 13 deletions(-) create mode 100644 index.html diff --git a/i-form-data-repository/site/setup.cfg b/i-form-data-repository/site/setup.cfg index b006b6d..0b50557 100644 --- a/i-form-data-repository/site/setup.cfg +++ b/i-form-data-repository/site/setup.cfg @@ -2,6 +2,9 @@ [metadata] name = i-form-data-repository +[options] +packages = i_form_data_repository + [options.extras_require] tests = pytest-invenio>=2.1.0,<3.0.0 diff --git a/index.html b/index.html new file mode 100644 index 0000000..a511de8 --- /dev/null +++ b/index.html @@ -0,0 +1,443 @@ + + + + + + + + + I-Form Data Repository + + + + + + + + + + + +
+

Test Instance

+

This is the test instance of the I-Form Repository.

+
+ + +
+
+ + + + + + + +
+
+
+ + +
+ + +
+
+
+
+

Research Results

+ +
Frontpage: Description for research results
+ + +
+
+
+
+

Publications

+ +
Frontpage: Description for publications
+ + +
+
+
+
+

Educational Resources

+ +
Frontpage: Description for open educational resources
+ + +
+
+
+
+ + + +
+

Recent uploads

+ + +
+

There are no public records to show.

+
+ + + +
+ + +
+ + +
+

Need help?

+

We can help with:

+ +
    +
  • Uploading your research results, software, preprints, etc.
  • +
  • Increasing upload limit beyond our default policy of 10GB.
  • +
  • Establishing contact with data stewards.
  • +
  • Finding individual solutions.
  • +
+
+ + +
+

Good reasons to use the I-Form Repository

+ +
    +
  • Safe — Your research results are permanently available.
  • +
  • + Trusted — A service from I-Form, based on software developed by + CERN. +
  • +
  • + Citeable — Every upload is assigned a Digital Object Identifier + (DOI). +
  • +
  • + No waiting time — Uploads are made available online as soon as + you hit publish. Your DOI is registered within seconds. +
  • +
  • + Open or closed — You determine the visibility of your uploads. A + restricted access mode is possible. +
  • +
  • + Versioning — Easily update your dataset with the versioning + feature. +
  • +
  • + Usage statistics — All uploads display standards compliant usage + statistics. (More) +
  • +
+
+
+
+
+ + + + + + + + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/justfile b/justfile index 93fd866..aaa9e16 100644 --- a/justfile +++ b/justfile @@ -87,7 +87,7 @@ deploy *args: fmt: bun run prettier --write "**/*.{js,jsx,ts,tsx,html,css,scss,sass,svelte,yaml,json,markdown}" -test-local: +build-wheels: #!/usr/bin/env bash echo "Building fresh wheels for local packages..." mkdir -p i-form-data-repository/local_wheels @@ -99,10 +99,12 @@ test-local: (cd ../invenio-config-iform && rm -rf dist && uv run pybabel compile -d invenio_config_iform/translations && uvx --from build pyproject-build -w) cp ../invenio-config-iform/dist/*.whl i-form-data-repository/local_wheels/ +test-local: build-wheels + #!/usr/bin/env bash echo "Rebuilding and restarting local docker stack..." cd i-form-data-repository docker compose -f docker-compose.full.yml --env-file ../.env down - docker compose -f docker-compose.full.yml --env-file ../.env build --no-cache --build-arg INSTALL_LOCAL_WHEELS=true + docker build -t i-form-data-repository:latest --no-cache --build-arg INSTALL_LOCAL_WHEELS=true . docker compose -f docker-compose.full.yml --env-file ../.env up -d --wait docker compose -f docker-compose.full.yml --env-file ../.env exec worker bash -c "invenio db init || true; invenio db create || true; invenio alembic upgrade || true; invenio index init || true" curl -skI https://127.0.0.1:8443/ || echo "HTTPS verification failed" @@ -113,31 +115,36 @@ load-aws-secrets: @if [ -f aws_secrets.sh ]; then . ./aws_secrets.sh; else echo "AWS secrets file not found"; exit 1; fi # First-time deployment to production -prod-deploy: load-aws-secrets - @echo "Deploying to production (first-time)..." +prod-deploy: load-aws-secrets build-wheels + #!/usr/bin/env bash + echo "Deploying to production (first-time)..." git switch prod git pull origin prod # Build and start containers - cd i-form-data-repository && docker compose -f docker-compose.full.yml --env-file ../.env up -d --build --wait + cd i-form-data-repository + docker build -t i-form-data-repository:latest --no-cache --build-arg INSTALL_LOCAL_WHEELS=true . + docker compose -f docker-compose.full.yml --env-file ../.env up -d --wait # Run initial database setup, migrations, and collect static assets - cd i-form-data-repository && docker compose -f docker-compose.full.yml --env-file ../.env exec worker bash -c " + docker compose -f docker-compose.full.yml --env-file ../.env exec worker bash -c " \ invenio db init && \ invenio db create && \ invenio alembic upgrade head && \ invenio collect -v && \ - invenio index init + invenio index init \ " # Update production without full redeploy (pull + migrations + static) -prod-update: load-aws-secrets - @echo "Updating production deployment..." +prod-update: load-aws-secrets build-wheels + #!/usr/bin/env bash + echo "Updating production deployment..." git switch prod git pull origin prod - cd i-form-data-repository && docker compose -f docker-compose.full.yml --env-file ../.env pull - cd i-form-data-repository && docker compose -f docker-compose.full.yml --env-file ../.env up -d --wait - cd i-form-data-repository && docker compose -f docker-compose.full.yml --env-file ../.env exec worker bash -c " + cd i-form-data-repository + docker build -t i-form-data-repository:latest --no-cache --build-arg INSTALL_LOCAL_WHEELS=true . + docker compose -f docker-compose.full.yml --env-file ../.env up -d --wait + docker compose -f docker-compose.full.yml --env-file ../.env exec worker bash -c " \ invenio alembic upgrade head && \ - invenio collect -v + invenio collect -v \ " # Clean all build artefacts and environment