Use hatch for installing.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fedfca25a5
commit
712c50fac7
|
@ -5,3 +5,5 @@
|
||||||
!src/
|
!src/
|
||||||
!requirements/
|
!requirements/
|
||||||
!entrypoint.sh
|
!entrypoint.sh
|
||||||
|
!pyproject.toml
|
||||||
|
!README.md
|
||||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -11,7 +11,13 @@ ARG DJANGO_ENV
|
||||||
ARG BUILD
|
ARG BUILD
|
||||||
ENV BUILD ${BUILD}
|
ENV BUILD ${BUILD}
|
||||||
|
|
||||||
RUN apt-get update \
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www
|
||||||
|
COPY --chown=www:www . .
|
||||||
|
RUN mkdir /app/src/static \
|
||||||
|
&& chown www:www /app/src/static \
|
||||||
|
&& apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
binutils \
|
binutils \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
|
@ -23,15 +29,9 @@ RUN apt-get update \
|
||||||
libgdk-pixbuf2.0-0 \
|
libgdk-pixbuf2.0-0 \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
shared-mime-info \
|
shared-mime-info \
|
||||||
gettext
|
gettext \
|
||||||
|
&& pip install . \
|
||||||
WORKDIR /app
|
&& django-admin compilemessages
|
||||||
|
|
||||||
RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www
|
|
||||||
COPY --chown=www:www . /app/
|
|
||||||
RUN mkdir /app/src/static && chown www:www /app/src/static
|
|
||||||
RUN pip install -r requirements/$([ "$DJANGO_ENV" = "production" ] && echo "base.txt" || echo "dev.txt") &&\
|
|
||||||
django-admin compilemessages
|
|
||||||
|
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling", "hatch-vcs"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
|
@ -22,11 +22,12 @@ dependencies = [
|
||||||
"django-zen-queries==2.1.0",
|
"django-zen-queries==2.1.0",
|
||||||
"django-registries==0.0.3",
|
"django-registries==0.0.3",
|
||||||
"django-view-decorator==0.0.4",
|
"django-view-decorator==0.0.4",
|
||||||
|
"django-oauth-toolkit==2.3.0",
|
||||||
]
|
]
|
||||||
dynamic = ["version"]
|
version = "0.0.1"
|
||||||
|
|
||||||
[tool.hatch.version]
|
[tool.hatch.build.targets.wheel]
|
||||||
source = "vcs"
|
packages = ["src"]
|
||||||
|
|
||||||
[tool.hatch.envs.default]
|
[tool.hatch.envs.default]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
@ -59,7 +60,7 @@ cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --
|
||||||
no-cov = "cov --no-cov {args}"
|
no-cov = "cov --no-cov {args}"
|
||||||
typecheck = "mypy --config-file=pyproject.toml ."
|
typecheck = "mypy --config-file=pyproject.toml ."
|
||||||
requirements = "pip-compile --output-file requirements/base.txt pyproject.toml"
|
requirements = "pip-compile --output-file requirements/base.txt pyproject.toml"
|
||||||
server = "./src/manage.py runserver"
|
server = "./src/manage.py runserver 0.0.0.0:8000"
|
||||||
migrate = "./src/manage.py migrate"
|
migrate = "./src/manage.py migrate"
|
||||||
makemigrations = "./src/manage.py makemigrations"
|
makemigrations = "./src/manage.py makemigrations"
|
||||||
createsuperuser = "./src/manage.py createsuperuser"
|
createsuperuser = "./src/manage.py createsuperuser"
|
||||||
|
|
Loading…
Reference in a new issue