From 5dbf3f876c4fb380ec9e151dcad5ea2590f97870 Mon Sep 17 00:00:00 2001 From: "Dusan Mijatovic (PC2020)" Date: Tue, 2 Jul 2024 17:46:20 +0200 Subject: [PATCH] fix: improve deployment files --- .env.example | 13 ++++--------- .github/workflows/release.yml | 2 +- deployment/README.md | 13 +++++++++++-- deployment/docker-compose.yml | 11 +++++------ 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.env.example b/.env.example index 2e232dd..4a7910e 100644 --- a/.env.example +++ b/.env.example @@ -76,7 +76,7 @@ RSD_AUTH_COUPLE_PROVIDERS=ORCID # SURFCONEXT - TEST ENVIRONMENT # consumed by: authentication, frontend/utils/loginHelpers -SURFCONEXT_CLIENT_ID=kin-rpd-demo-test.com +SURFCONEXT_CLIENT_ID=kin-rpd-demo.com # consumed by: authentication, frontend/utils/loginHelpers SURFCONEXT_REDIRECT=http://localhost/auth/login/surfconext # consumed by: authentication, frontend/utils/loginHelpers @@ -161,11 +161,6 @@ PGRST_JWT_SECRET= # obtain the secret from SURFCONEXT dashboard AUTH_SURFCONEXT_CLIENT_SECRET= -# Helmholtz ID -# consumed by services: authentication -# obtain the secret from the project team -AUTH_HELMHOLTZID_CLIENT_SECRET= - # ORCID # consumed by services: authentication # obtain the secret from the project team @@ -191,8 +186,8 @@ CROSSREF_CONTACT_EMAIL= # consumed by: frontend # URL (should end with a trailing slash) and ID for Matomo Tracking Code -MATOMO_URL= -MATOMO_ID= +# MATOMO_URL= +# MATOMO_ID= # consumed by: scrapers -LIBRARIES_IO_ACCESS_TOKEN= +# LIBRARIES_IO_ACCESS_TOKEN= diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e983abc..fce33c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -181,7 +181,7 @@ jobs: name: ${{needs.release_tag.outputs.tag}} body: ${{needs.release_tag.outputs.changelog}} draft: true - prerelease: false + prerelease: ${{inputs.pre_release}} files: deployment.zip # citation: diff --git a/deployment/README.md b/deployment/README.md index 1485d82..e6ed06a 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -15,13 +15,22 @@ docker compose --version ## Environment variables -RSD modules require a number of environment variables to work properly. The values should be provided in `.env` file which should be at the same location as the `docker-compose.yml` file. An example environment file `.env.example` is provided. Rename this file to `.env` and provide the required secrets. +KIN-RPD requires a number of environment variables to work properly. The values should be provided in `.env` file which should be at the same location as the `docker-compose.yml` file. An example environment file `.env.example` is provided. Rename this file to `.env` and provide the required secrets. ## NGINX configuration -The default `nginx.conf` file is provided. The nginx image is based on nginx:1.21.6 with certbot already installed. +The default `nginx.conf` file is provided. The nginx image is based on nginx:1.25.4 with certbot already installed. To enable certbox certificate for your domain you will need to add your domains to `nginx.conf file`. The `docker-compose.yml` file expects `nginx.conf` file to be in the same folder. +## Used RSD services/modules + +KIN-RPD is adapted version of RSD. It requires the following RSD services to function properly: + +- rsd-saas/database: This is RSD postgres database with all tables and functions. KIN-RPD uses RSD database to store data. +- rsd-saas/backend: This is RSD postgREST api service, registered at /api/v1 route. KIN-RPD uses RSD backend service. +- rsd-saas/auth: This is RSD authentication service. KIN-RPD uses RSD auth service for user authentication. +- rsd-saas/scrapers: This is RSD scrapers service used to scrape citations and other data. KIN-RPD uses RSD scraper services for scraping citations. + ## Start After you provided required values in .env file and updated domain names in nginx.conf file you can start RSD using `docker compose up` diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index d5592c0..259cd1e 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -1,5 +1,6 @@ # THIS DOCKER FILE REQUIRES .env FILE -version: "3.0" + +# version: "3.0" services: database: @@ -166,19 +167,17 @@ services: ports: - "80:80" - "443:443" - volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf - - lets-encrypt:/etc/letsencrypt depends_on: - database - backend - auth - frontend - - codemeta - - swagger - documentation networks: - net + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf + - lets-encrypt:/etc/letsencrypt restart: unless-stopped # define name for docker network