Skip to content

Commit

Permalink
renamed .env to .backend.env, tried different setting of environment …
Browse files Browse the repository at this point in the history
…variables
  • Loading branch information
cheminfolab committed Apr 6, 2024
1 parent d885ab4 commit 6d9877e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ npm install
### Docker

````bash
docker compose -d --build
docker compose up -d --build
````
or with a respective .env file:
````bash
docker compose --env-file .backend.env up -d --build
````

### Native
Expand Down
4 changes: 3 additions & 1 deletion backend/api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"""

from pathlib import Path
from decouple import config, Csv
from decouple import config, Csv # Config, RepositoryEnv, Csv #
from datetime import timedelta

# config = Config(RepositoryEnv(Path(Path(__file__).resolve().parent.parent.parent, ".backend.env")))

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
container_name: eln_db
#restart: unless-stopped
image: postgres:15.1
env_file: .env
env_file: .backend.env
volumes:
- eln_db:/var/lib/postgresql/data/
ports:
Expand All @@ -20,7 +20,7 @@ services:
build:
context: ./backend
dockerfile: Dockerfile
env_file: .env
env_file: .backend.env
environment:
- POSTGRES_HOST=database
ports:
Expand Down

0 comments on commit 6d9877e

Please sign in to comment.