Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions medcat-model-distributor/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ services:
medcatweb:
build:
context: ./webapp
command: >
bash -c "
python manage.py migrate --noinput &&
/etc/init.d/cron start &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- ../medcat-v2/tests/resources:/webapp/models
ports:
Expand Down
5 changes: 0 additions & 5 deletions medcat-model-distributor/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
services:
medcatweb:
image: cogstacksystems/medcat-model-distributor
command: >
bash -c "
python manage.py migrate --noinput &&
/etc/init.d/cron start &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- ./webapp/data:/webapp/data
- ./webapp/db:/webapp/db
Expand Down
1 change: 0 additions & 1 deletion medcat-model-distributor/envs/env_medmen
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
MODEL_PACK_PATH=//
1 change: 0 additions & 1 deletion medcat-model-distributor/envs/env_medmen_test
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
MODEL_PACK_PATH=/webapp/models/mct2_model_pack.zip
8 changes: 8 additions & 0 deletions medcat-model-distributor/webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ RUN chmod 0644 /etc/cron.d/db-backup-cron && crontab /etc/cron.d/db-backup-cron

# Run collect static (could be in entrypoint script)
RUN python manage.py collectstatic --noinput

# setup entrypoint
COPY entrypoint.sh /webapp/entrypoint.sh
RUN chmod +x /webapp/entrypoint.sh
# this does migration and cron job
ENTRYPOINT ["/webapp/entrypoint.sh"]
# and then, finally runs the (flexible) runserver command
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
6 changes: 6 additions & 0 deletions medcat-model-distributor/webapp/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

python manage.py migrate --noinput
/etc/init.d/cron start || echo "cron failed, continuing"
exec "$@"