Skip to content

Commit

Permalink
start api server in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sunForest committed May 10, 2015
1 parent 8258a4c commit 1414191
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ apt-get install -y \
libpq-dev \
libgeos-dev \
nginx

COPY deployment/avipost.conf /etc/nginx/sites-enabled/
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

ADD . /usr/src/app
ADD . /usr/src/app/
RUN pip install -r requirements/prod.txt
RUN cd avipost/ && DJANGO_SETTINGS_MODULE=avipost.settings.ci gunicorn avipost.wsgi:application
RUN service nginx start

# TODO copy nginx configuration

CMD ['nginx', '-g', 'daemon off;']
# CMD ['nginx', '-g', 'daemon off;']
2 changes: 1 addition & 1 deletion avipost/avipost/settings/dev_ssen.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'avipost',
'USER': 'geodjango',
'PASSWORD': get_env_variable('DB_PASSWORD'),
'PASSWORD': 'X2ekaerp',
'HOST': '127.0.0.1',
'PORT': '5432',
}
Expand Down
1 change: 1 addition & 0 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ coverage==3.7.1
coveralls==0.5
djangorestframework==3.1.1
docopt==0.6.2
gunicorn==19.3.0
psycopg2==2.6
requests==2.6.0
wsgiref==0.1.2
Expand Down

0 comments on commit 1414191

Please sign in to comment.