mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Everything docker related is now available in its own subfolder
This commit is contained in:
27
docker/Dockerfile
vendored
Normal file
27
docker/Dockerfile
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM ubuntu
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
RUN apt-get update -y
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3 python3-dev python3-pip python3-venv nginx-full
|
||||
|
||||
COPY . /pyshelf
|
||||
|
||||
WORKDIR /pyshelf/
|
||||
RUN python3 -m pip install -r requirements.txt
|
||||
|
||||
# COPY ../uwsgi_params /etc/nginx/uwsgi_params
|
||||
COPY ./docker/pyshelf_nginx.conf /etc/nginx/sites-available/pyshelf_nginx.conf
|
||||
RUN ln -s /etc/nginx/sites-available/pyshelf_nginx.conf /etc/nginx/sites-enabled/
|
||||
|
||||
WORKDIR /pyshelf/
|
||||
ENTRYPOINT cd src/ \
|
||||
&& python3 manage.py makemigrations \
|
||||
&& python3 manage.py makemigrations interface \
|
||||
&& python3 manage.py migrate \
|
||||
&& python3 manage.py migrate interface \
|
||||
&& cd .. \
|
||||
&& python3 importBooks \
|
||||
&& python3 makeCollections \
|
||||
&& nginx -g "daemon on;" \
|
||||
&& uwsgi --ini uwsgi.ini
|
||||
Reference in New Issue
Block a user