-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from RTIInternational/devlike-prod-deployment
replicating dev in prod
- Loading branch information
Showing
3 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
FROM python:3.5.7 | ||
FROM python:3.8 | ||
ENV PYTHONUNBUFFERED 1 | ||
RUN apt-get update && apt-get install -y netcat-traditional mysql-client | ||
RUN apt-get update && apt-get install -y netcat-traditional | ||
WORKDIR /code | ||
ADD ./docker/requirements.txt /code/requirements.txt | ||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements.txt | ||
RUN pip install gunicorn | ||
ADD ./smart/ /code/ | ||
ADD ./django/ /code/ | ||
RUN mkdir -p /data/data_files /data/tf_idf /data/model_pickles /data/code_books | ||
EXPOSE 8000 | ||
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "--timeout", "75", "--worker-class", "gevent", "config.wsgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
docker-compose down | ||
docker volume rm vol_smart_pgdata vol_smart_data | ||
docker volume create vol_smart_pgdata | ||
docker volume create vol_smart_data | ||
docker-compose build | ||
docker-compose run --rm smart_backend ./migrate.sh | ||
docker-compose run --rm smart_backend ./seed_smart.sh | ||
docker-compose up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters