Skip to content

Commit

Permalink
Merge pull request #43 from oceanprotocol/bug/fix_envs
Browse files Browse the repository at this point in the history
add envs for secrets
  • Loading branch information
alexcos20 authored Jul 10, 2023
2 parents 9c922bb + 7b9241f commit fd32f8c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 3 additions & 3 deletions server/server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd32f8c

Please sign in to comment.