forked from DPCS-team/DPCS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server/Ticket78/Fix interface api calls on the server side. DPCS-team#79
Added searching required by API. Changed order of commands in Dockerfile. Now, after modyfing code and running ./rebuild-docker it doesn't install requirements once again.
- Loading branch information
1 parent
54d0412
commit 289f22b
Showing
2 changed files
with
27 additions
and
12 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 |
---|---|---|
|
@@ -2,10 +2,16 @@ FROM python:3.5 | |
MAINTAINER Leonid Logvinov <[email protected]> | ||
RUN mkdir /dpcs | ||
WORKDIR /dpcs | ||
ADD . /dpcs | ||
ENV DJANGO_SETTINGS_MODULE 'server_django.prod_settings' | ||
ADD ./requirements/ /dpcs/requirements/ | ||
RUN pip install -r requirements/requirements.common | ||
RUN pip install -r requirements/requirements.prod | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
nginx \ | ||
gettext-base \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
ADD . /dpcs | ||
RUN python manage.py check --deploy | ||
RUN python manage.py makemigrations | ||
RUN python manage.py migrate | ||
|
@@ -14,16 +20,11 @@ RUN python manage.py migrate alpha | |
RUN python manage.py collectstatic -v0 --no-input | ||
RUN echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', '[email protected]', 'pass')" | python manage.py shell | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
nginx \ | ||
gettext-base \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY nginx.conf /etc/nginx/nginx.conf | ||
|
||
EXPOSE 80 | ||
|
||
RUN nginx | ||
|
||
CMD ["gunicorn", "-c", "gunicorn_conf.py", "--chdir", "/dpcs", "server_django.wsgi", "--reload"] | ||
CMD ["gunicorn", "-c", "gunicorn_conf.py", "--chdir", "/dpcs", "server_django.wsgi", "--reload"] | ||
|
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