Skip to content

Commit

Permalink
fix: improve deployment files
Browse files Browse the repository at this point in the history
  • Loading branch information
dmijatovic committed Jul 2, 2024
1 parent 6af2647 commit 5dbf3f8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
13 changes: 4 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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=
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 11 additions & 2 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
11 changes: 5 additions & 6 deletions deployment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# THIS DOCKER FILE REQUIRES .env FILE
version: "3.0"

# version: "3.0"

services:
database:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5dbf3f8

Please sign in to comment.