From 4e834bac05935cfe6cdee614d756e3a2e6f60142 Mon Sep 17 00:00:00 2001 From: EnzoVezzaro Date: Thu, 27 Apr 2023 12:29:56 -0400 Subject: [PATCH 1/2] fix microservices description in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6d7f6e..217e8c4 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,5 @@ Thanks to the $OCEAN community for the funding and the $OCEAN core team for the This project is delivered under an Apache License ## Additional projects - - DBS Arweave microservice (https://github.com/oceanprotocol/dbs_filecoin) - - DBS Filecoin microservice (https://github.com/oceanprotocol/dbs_arweave) + - DBS Filecoin microservice (https://github.com/oceanprotocol/dbs_filecoin) + - DBS Arweave microservice (https://github.com/oceanprotocol/dbs_arweave) From 7b9241f18a413b7efe97a264d2c5d12452c2b718 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Mon, 10 Jul 2023 16:47:50 +0300 Subject: [PATCH 2/2] add envs for secrets --- Dockerfile | 2 ++ README.md | 5 +++++ server/server/settings.py | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c12eb6..657fa87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,4 +14,6 @@ COPY . /usr/src/app WORKDIR /usr/src/app/server RUN python manage.py migrate EXPOSE 8000 +ENV DEBUG=False +ENV SECRET_KEY='xx' CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] \ No newline at end of file diff --git a/README.md b/README.md index 217e8c4..6e77750 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,11 @@ You can create a superuser with `./manage.py createsuperuser` to be able to acce ## Usage You can navigate the API using the url `http://myserver.com/docs/` (Swagger based OpenAPI documentation, default on localhost:8000). +## ENVS + +- DEBUG = False (if we should enable debug mode in django) +- SECRET_KEY = secret key for django + # Dockerfile usage You can also just build the available Dockerfile and run the server from there using the following commands: diff --git a/server/server/settings.py b/server/server/settings.py index 904b53f..53df282 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -21,12 +21,12 @@ # See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '6e_qi$a_w5rni$dl)!r-xq-h*=da6q3#4gs4k3%+p(bd42yrv+' +SECRET_KEY = os.environ.get("SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = os.environ.get("DEBUG",False) -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['*'] # Application definition