MT#7247 docker: add dev requirements to run django inside docker easily

Change-Id: I7ca8507732f8e9f035d217ad7f2bc3b61f17d2d9
changes/13/5913/1
Victor Seva 10 years ago
parent be9513dd1f
commit 9365df9d36

@ -28,7 +28,8 @@ migrate: venv_prod
################################### ###################################
run_dev: run_dev:
./manage.py runserver_plus --settings="repoapi.settings.dev" IP=$(shell ip a show dev eth0 scope global | grep inet | awk '{print $$2}' | cut -d/ -f1); \
./manage.py runserver_plus $$IP:8000 --settings="repoapi.settings.dev"
################################### ###################################

@ -5,14 +5,14 @@ FROM docker.mgm.sipwise.com/sipwise-jessie:latest
# is updated with the current date. It will force refresh of all # is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using # of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built. # old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2016-01-12 ENV REFRESHED_AT 2016-04-29
RUN apt-get update RUN apt-get update
RUN apt-get install --assume-yes python2.7 python2.7-dev python-distribute python-pip git RUN apt-get install --assume-yes python2.7 python2.7-dev python-distribute python-pip git
# Get pip to download and install requirements: # Get pip to download and install requirements:
COPY test.txt common.txt /tmp/ COPY dev.txt test.txt common.txt /tmp/
RUN pip install -r /tmp/test.txt RUN pip install -r /tmp/dev.txt
RUN echo './t/testrunner' >>/root/.bash_history RUN echo './t/testrunner' >>/root/.bash_history
@ -32,4 +32,6 @@ WORKDIR /code/
# Inside docker (the command is in history, just press UP button): # Inside docker (the command is in history, just press UP button):
# ./t/testrunner # ./t/testrunner
# #
# Run django inside docker:
# make run_dev
################################################################################ ################################################################################

@ -0,0 +1,2 @@
-r test.txt
Werkzeug
Loading…
Cancel
Save