Add files necessary for production deployment
* Dockerfile, docker-compose template * nginx config * uwsgi config * wait-for-postgres script * requirements.txt * Some other stuff Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
# required packages
|
||||
RUN apt update
|
||||
RUN apt install -y postgresql gcc
|
||||
|
||||
# app dir
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
|
||||
# python packages
|
||||
COPY requirements.txt .
|
||||
RUN python3 -m pip install -r requirements.txt
|
||||
|
||||
# cmd
|
||||
CMD scripts/wait-for-postgres.sh db python3 manage.py migrate && \
|
||||
yes yes | python3 manage.py collectstatic && \
|
||||
uwsgi --ini uwsgi.ini
|
||||
Reference in New Issue
Block a user