Updated docker build
This commit is contained in:
parent
27d1b03c3c
commit
93c4926dfd
25
Dockerfile
25
Dockerfile
@ -1,21 +1,24 @@
|
||||
FROM alpine:3.14
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk add --no-cache python3 git ghostscript sqlite
|
||||
ENV TARGET=/opt/polyphonic
|
||||
ENV RELEASE=polyphonic-0.8.3-py3-none-any.whl
|
||||
|
||||
RUN apk add --no-cache python3 py3-pip git ghostscript sqlite
|
||||
|
||||
WORKDIR /root
|
||||
RUN python3 -m ensurepip
|
||||
RUN pip3 install -U pip --no-cache-dir
|
||||
|
||||
COPY app/requirements.txt .
|
||||
RUN pip3 install -r requirements.txt --no-cache-dir
|
||||
RUN python3 -m venv ${TARGET}
|
||||
ENV PATH="${TARGET}/bin:$PATH"
|
||||
|
||||
COPY app /opt/polyphonic
|
||||
WORKDIR /opt/polyphonic
|
||||
COPY dist/${RELEASE} .
|
||||
RUN pip3 install ${RELEASE} --no-cache-dir
|
||||
|
||||
COPY docker_settings.py polyphonic/local_settings.py
|
||||
RUN SECRET_KEY=_ python3 manage.py collectstatic --noinput
|
||||
WORKDIR ${TARGET}
|
||||
|
||||
COPY docker_settings.py local_settings.py
|
||||
RUN SECRET_KEY=_ ${TARGET}/bin/manage collectstatic --noinput
|
||||
|
||||
VOLUME ["/var/polyphonic"]
|
||||
|
||||
ENTRYPOINT ["python3", "manage.py"]
|
||||
ENTRYPOINT ["manage"]
|
||||
CMD ["runserver", "0.0.0.0:8000", "--insecure"]
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
try:
|
||||
from .local_settings import * # noqa
|
||||
from local_settings import * # noqa
|
||||
except ImportError:
|
||||
from .default_settings import * # noqa
|
||||
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
from .default_settings import *
|
||||
from polyphonic.default_settings import *
|
||||
import os
|
||||
|
||||
DEBUG = bool(os.environ.get("DEBUG", False))
|
||||
|
||||
CACHE_DIR = "/var/polyphonic/cache"
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': '/var/polyphonic/db.sqlite3',
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": "/var/polyphonic/db.sqlite3",
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,8 @@ dependencies = [
|
||||
"requests (>=2.32.5,<3.0.0)",
|
||||
"django-storages (>=1.14.6,<2.0.0)",
|
||||
"boto3 (>=1.40.20,<2.0.0)",
|
||||
"whoosh (>=2.7.4,<3.0.0)"
|
||||
"whoosh (>=2.7.4,<3.0.0)",
|
||||
"tzdata (>=2026.2,<2027.0)"
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user