Initial commit
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM ubuntu
|
||||
|
||||
RUN useradd -d /app app
|
||||
RUN apt-get update && \
|
||||
apt-get -y install python \
|
||||
python-dev \
|
||||
python-pip \
|
||||
libpq-dev \
|
||||
uwsgi \
|
||||
uwsgi-plugin-python \
|
||||
git
|
||||
|
||||
# We use that to cache last requirements version
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install -r /app/requirements.txt
|
||||
|
||||
RUN apt-get -y install python-psycopg2
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
EXPOSE 8000
|
||||
USER app
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
CMD ./manage.py db upgrade && \
|
||||
uwsgi --http-socket :8000 --processes 4 --master --plugin python \
|
||||
--pythonpath /app --module flaskbase.wsgi:application \
|
||||
--touch-reload '/app/flaskbase/wsgi.py'
|
||||
Reference in New Issue
Block a user