Commit 4bdea524 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

allow local tests

parent fc90b421
FROM python:3.7
WORKDIR /app
ADD requirements.prod.txt requirements.txt .
RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \
--mount=type=cache,sharing=locked,target=/var/lib/apt \
--mount=type=cache,sharing=locked,target=/root/.cache \
apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
libgdal28 \
netcat \
&& python -m pip install -U pip \
&& python -m pip install -U -r requirements.prod.txt
ADD . .
CMD while ! nc -z postgres 5432; do sleep 1; done \
&& ./coverage.sh
Djadhere
========
# Djadhere
Système d’Information (SI) du FAI associatif tetaneutral.net
......@@ -8,3 +7,10 @@ Système d’Information (SI) du FAI associatif tetaneutral.net
* Wiki : https://chiliproject.tetaneutral.net/projects/tetaneutral/wiki/Djadhere/
* Jabber : djadhere@chat.cannelle.eu.org ([webchat](https://jappix.cannelle.eu.org/?r=djadhere@chat.cannelle.eu.org))
* IRC : `#djadhere` sur le réseau `irc.freenode.net` ([webchat](https://kiwiirc.com/client/chat.freenode.net?chan=#djadhere))
## Local test
```
docker compose up --build --exit-code-from tests
```
......@@ -92,9 +92,19 @@ WSGI_APPLICATION = "djadhere.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.contrib.gis.db.backends.spatialite",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": os.environ.get("POSTGRES_NAME", "postgres"),
"USER": os.environ.get("POSTGRES_USER", "postgres"),
"PASSWORD": os.environ["POSTGRES_PASSWORD"],
"HOST": os.environ.get("POSTGRES_HOST", "postgres"),
},
# "ponyair": {
# "ENGINE": "django.contrib.gis.db.backends.postgis",
# "NAME": os.environ.get("PONYAIR_NAME", "ponyair"),
# "USER": os.environ.get("PONYAIR_USER", "ponyair"),
# "PASSWORD": os.environ["PONYAIR_PASSWORD"],
# "HOST": os.environ.get("PONYAIR_HOST", "ponyair"),
# },
}
SPATIALITE_LIBRARY_PATH = "mod_spatialite"
......@@ -172,3 +182,6 @@ CHECK_MK_URL = (
WEBHOOK = False
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
ALLOCATIONS_EMAILS = ["changeme@change.me"]
PAYMENTS_EMAILS = ["changeme@change.me"]
version: '3'
services:
postgres:
image: postgis/postgis:11-2.5
env_file:
- .env
tests:
build: .
env_file:
- .env
-r requirements.txt
psycopg2
# geos
# proj
# gdal
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment