diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..76bf1fd --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +local_settings.py +db.sqlite3 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 12f382c..f40d561 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,12 @@ __pycache__ *.pyc db.sqlite3 credentials -polyphonic/settings.py +local_settings.py env +old test.* static teststore cache local_storage -media \ No newline at end of file +media diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0d2eb8f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM alpine:3.14 + +RUN apk add --no-cache python3 git ghostscript sqlite + +WORKDIR /root +RUN python3 -m ensurepip +RUN pip3 install -U pip --no-cache-dir + +COPY app /opt/polyphonic +WORKDIR /opt/polyphonic + +COPY docker_settings.py polyphonic/local_settings.py + +RUN pip3 install -r requirements.txt --no-cache-dir + +RUN mkdir /var/polyphonic +RUN SECRET_KEY=_ python3 manage.py collectstatic --noinput + +ENTRYPOINT ["python3", "manage.py"] +CMD ["runserver", "0.0.0.0:8000", "--insecure"] \ No newline at end of file diff --git a/app/interface/templates/interface/project_base.html b/app/interface/templates/interface/project_base.html index 08f7733..4ee91af 100644 --- a/app/interface/templates/interface/project_base.html +++ b/app/interface/templates/interface/project_base.html @@ -42,14 +42,14 @@ {% endif %}
Admin
- {% if request.is_admin %}{{ collection.location }}, {{ collection.works.count }} items.
++ {% if collection.location %}{{ collection.location }},{% endif %} + {{ collection.works.count }} items. +
Are you sure you want to delete
+ "{{ object.upload.name }}"?