Add Unraid all-in-one runtime
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-17 04:41:50 +02:00
parent ed083d1f3a
commit e553ce845b
17 changed files with 422 additions and 104 deletions
+58
View File
@@ -0,0 +1,58 @@
FROM node:20-alpine AS frontend-build
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ ./
RUN npm run build
FROM postgis/postgis:16-3.4 AS runtime
ENV GEOINTEL_ENV=production \
GEOINTEL_API_PREFIX=/api/v1 \
GEOINTEL_STORAGE_ROOT=/app/storage \
STORAGE_ROOT=/app/storage \
GEOINTEL_POSTGRES_DB=geointel \
GEOINTEL_POSTGRES_USER=geointel \
GEOINTEL_POSTGRES_PASSWORD=geointel \
GEOINTEL_ALL_IN_ONE=1 \
PATH="/opt/geointel/venv/bin:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
gdal-bin \
libgdal-dev \
libgeos-dev \
libpq-dev \
libproj-dev \
nginx \
proj-bin \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY backend/ /app/
COPY fixtures/ /app/fixtures/
COPY deploy/unraid/nginx-all-in-one.conf /etc/nginx/conf.d/default.conf
COPY deploy/unraid/all-in-one-start.sh /usr/local/bin/geointel-all-in-one-start
COPY --from=frontend-build /frontend/dist/ /usr/share/nginx/html/
RUN python3 -m venv /opt/geointel/venv \
&& pip install --no-cache-dir --upgrade pip setuptools \
&& pip install --no-cache-dir ".[gis]" \
&& python scripts/gis_import_smoke.py \
&& chmod +x /usr/local/bin/geointel-all-in-one-start \
&& mkdir -p /app/storage /run/nginx /var/log/nginx
VOLUME ["/var/lib/postgresql/data", "/app/storage"]
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=10 --start-period=60s \
CMD curl -fsS http://127.0.0.1/health >/dev/null || exit 1
CMD ["/usr/local/bin/geointel-all-in-one-start"]