Skip to content

Commit

Permalink
Merge 00043c4 into ccd968f
Browse files Browse the repository at this point in the history
  • Loading branch information
victor-salles committed Aug 3, 2022
2 parents ccd968f + 00043c4 commit 10e9cf3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ You can set environment variables in your OS, write on ```.env``` file or pass v
| GUNICORN_WORKERS | ``` int ``` | ``` multiprocessing.cpu_count() * 2 + 1 ``` | Gunicorn number of workers.
| USE_ELASTICSEARCH | ```boolean``` | ```true``` | Change the logic in requirements_to_train to use either elasticsearch or postgres.
| REPOSITORY_BLOCK_USER_LOGS | ```list``` | ```[]``` | List of repository authorization(api bearer) that won't save logs
| RUN_AS_DEVELOPMENT_MODE | ```boolean``` | ```false``` | Specifies how to run the server, in production or development mode.


## Roadmap
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: '3.6'

services:
bothub:
volumes:
- ./bothub:/home/app/bothub
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ services:
- ELASTICSEARCH_REPOSITORYNLPLOG_INDEX=${ELASTICSEARCH_REPOSITORYNLPLOG_INDEX:-ai_repositorynlplog}
- ELASTICSEARCH_REPOSITORYNLPLOG_INDEX=${ELASTICSEARCH_REPOSITORYQANLPLOG_INDEX:-ai_repositoryqanlplog}
- ELASTICSEARCH_SIGNAL_PROCESSOR=${ELASTICSEARCH_SIGNAL_PROCESSOR:-celery}
- RUN_AS_DEVELOPMENT_MODE=${RUN_AS_DEVELOPMENT_MODE:-false}

celery:
build:
Expand Down
7 changes: 6 additions & 1 deletion entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@
cd $WORKDIR
python manage.py collectstatic --noinput

gunicorn bothub.wsgi --timeout 999999 -c gunicorn.conf.py
if [ "$RUN_AS_DEVELOPMENT_MODE" = true -o "$RUN_AS_DEVELOPMENT_MODE" = "True" ]
then
python3 manage.py runserver 0.0.0.0:80
else
gunicorn bothub.wsgi --timeout 999999 -c gunicorn.conf.py
fi

0 comments on commit 10e9cf3

Please sign in to comment.