Skip to content

Commit

Permalink
default config is for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Sep 29, 2023
1 parent 8581b5c commit 9a7c293
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 13 deletions.
26 changes: 13 additions & 13 deletions backend/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ def assemble_cors_origins(cls, v: str | list[str]) -> list[str] | str: # pragma
return v
raise ValueError(v)

# == backend-related settings ==

#: Prefix for the backend of annonars service, default is for dev.
BACKEND_PREFIX_ANNONARS: str = "http://localhost:3001"
#: Prefix for the backend of mehari service, default is for dev.
BACKEND_PREFIX_MEHARI: str = "http://localhost:3002"
#: Prefix for the backend of viguno service, default is for dev.
BACKEND_PREFIX_VIGUNO: str = "http://localhost:3003"
#: Prefix for the backend of nginx service, default is for dev.
BACKEND_PREFIX_NGINX: str = "http://localhost:3004"

#: URL to REDIS service, default is for dev.
REDIS_URL: str = "redis://localhost:3030"
# == backend-related settings (defaults for production) ==

#: Prefix for the backend of annonars service.
BACKEND_PREFIX_ANNONARS: str = "http://annonars:8080"
#: Prefix for the backend of mehari service.
BACKEND_PREFIX_MEHARI: str = "http://mehari:8080"
#: Prefix for the backend of viguno service.
BACKEND_PREFIX_VIGUNO: str = "http://viguno:8080"
#: Prefix for the backend of nginx service.
BACKEND_PREFIX_NGINX: str = "http://nginx:80"

#: URL to REDIS service.
REDIS_URL: str = "redis://redis:5379"

# -- User-Related Configuration ---------------------------------------------

Expand Down
10 changes: 10 additions & 0 deletions backend/env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ POSTGRES_PASSWORD=db-password
POSTGRES_HOST=localhost
POSTGRES_PORT=3020
POSTGRES_DB=reev

# Prefixes to the backend services running in Docker Compose.
BACKEND_PREFIX_ANNONARS=http://localhost:3001
BACKEND_PREFIX_MEHARI=http://localhost:3002
BACKEND_PREFIX_VIGUNO=http://localhost:3003
BACKEND_PREFIX_NGINX=http://localhost:3004

# Superuser to setup on startup
[email protected]
FIRST_SUPERUSER_PASSWORD=password
11 changes: 11 additions & 0 deletions docs/dev_quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ You can use the provided ``Makefile`` files to install the dependencies.
$ make deps
-----------------
Setup Environment
-----------------

You need to create an ``.env`` file for the backend.
The values in ``env-dev`` are suitable for development with the ``reev-docker-compose`` with ``docker-compose.override.yml-dev``.

.. code-block:: bash
$ ln -sr backend/env-dev backend/.env
-------------------
Running the Servers
-------------------
Expand Down

0 comments on commit 9a7c293

Please sign in to comment.