forked from data.coop/membersystem
Use hatch for installing.
This commit is contained in:
parent
fedfca25a5
commit
712c50fac7
|
@ -5,3 +5,5 @@
|
|||
!src/
|
||||
!requirements/
|
||||
!entrypoint.sh
|
||||
!pyproject.toml
|
||||
!README.md
|
||||
|
|
20
Dockerfile
20
Dockerfile
|
@ -11,7 +11,13 @@ ARG DJANGO_ENV
|
|||
ARG 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 \
|
||||
binutils \
|
||||
libpq-dev \
|
||||
|
@ -23,15 +29,9 @@ RUN apt-get update \
|
|||
libgdk-pixbuf2.0-0 \
|
||||
libffi-dev \
|
||||
shared-mime-info \
|
||||
gettext
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
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
|
||||
gettext \
|
||||
&& pip install . \
|
||||
&& django-admin compilemessages
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[build-system]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
|
@ -22,11 +22,12 @@ dependencies = [
|
|||
"django-zen-queries==2.1.0",
|
||||
"django-registries==0.0.3",
|
||||
"django-view-decorator==0.0.4",
|
||||
"django-oauth-toolkit==2.3.0",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
version = "0.0.1"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src"]
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
dependencies = [
|
||||
|
@ -59,7 +60,7 @@ cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --
|
|||
no-cov = "cov --no-cov {args}"
|
||||
typecheck = "mypy --config-file=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"
|
||||
makemigrations = "./src/manage.py makemigrations"
|
||||
createsuperuser = "./src/manage.py createsuperuser"
|
||||
|
|
Loading…
Reference in a new issue