Improve production setup

This commit is contained in:
Sascha Ißbrücker
2019-07-05 01:26:52 +02:00
parent c489f354c5
commit 70f9fb9818
15 changed files with 120 additions and 77 deletions

View File

@@ -5,25 +5,17 @@ RUN apt-get update
RUN apt-get -y install build-essential
# Install requirements and uwsgi server for running python web apps
WORKDIR /etc/linkdings
WORKDIR /etc/linkding
COPY requirements.prod.txt ./requirements.txt
RUN pip install -U pip
RUN pip install -Ur requirements.txt
RUN pip install uwsgi
# Copy application
COPY bookmarks ./bookmarks
COPY siteroot ./siteroot
COPY static ./static
COPY manage.py .
COPY uwsgi.ini .
COPY bootstrap.sh .
RUN ["chmod", "+x", "./bootstrap.sh"]
# Create data folder
RUN ["mkdir", "data"]
COPY . .
# Expose uwsgi server at port 9090
EXPOSE 9090
# Start uwsgi server
# Run bootstrap logic
RUN ["chmod", "+x", "./bootstrap.sh"]
CMD ["./bootstrap.sh"]