Improve Docker setup

This commit is contained in:
Laurent Bossavit 2016-04-29 16:33:15 +02:00
parent 13e89fb4c9
commit 26710f346d
3 changed files with 11 additions and 4 deletions

View file

@ -1,8 +1,15 @@
FROM ubuntu:15.10
WORKDIR /app
WORKDIR /setup
RUN apt-get update
RUN apt-get install -y postgresql-9.4
RUN apt-get install -y postgresql-server-dev-9.4
RUN apt-get install -y postgis
RUN apt-get install -y python3-dev
RUN apt-get install -y python3-pip
RUN pip3 install --system uwsgi
ADD /setup* /setup/
ADD /requirements.txt /setup/
USER postgres
RUN service postgresql start && /setup/setup.sh
WORKDIR /app
CMD service postgresql start && uwsgi --http :8080 --wsgi-file backend.py --callable app

View file

@ -1,4 +1,3 @@
falcon
psycopg2
uuid

5
setup.sh Normal file → Executable file
View file

@ -1,2 +1,3 @@
pip install -r requirements.sh
psql < setup.sql
pip3 install -r requirements.txt
createdb oedb
psql oedb < setup.sql