# The map server for a public, read-only map. Build from the folder that holds worldgen/ and worldmap-viewer/: # podman build -f worldmap-viewer/deploy/Containerfile -t worldmap-viewer . # Code only: worlds (config/, places/, built out/) are mounted at run time — see deploy/README.md. FROM docker.io/library/python:3.14-slim ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 \ WORLDGEN=/app/worldgen NUMBA_CACHE_DIR=/var/cache/worldmap-viewer/numba \ OPENBLAS_THREAD_TIMEOUT=4 \ WORLDMAP_PUBLIC=1 WORLDMAP_BIND=0.0.0.0 WORLDMAP_PORT=8765 COPY worldmap-viewer/deploy/requirements.lock /app/requirements.lock RUN pip install --no-cache-dir --root-user-action=ignore -r /app/requirements.lock COPY worldgen/mapgen /app/worldgen/mapgen COPY worldmap-viewer/*.py worldmap-viewer/LICENSE worldmap-viewer/CREDITS.md worldmap-viewer/licenses.md /app/worldmap-viewer/ COPY worldmap-viewer/viewer/index.html worldmap-viewer/viewer/style.css /app/worldmap-viewer/viewer/ COPY worldmap-viewer/viewer/js /app/worldmap-viewer/viewer/js COPY worldmap-viewer/viewer/vendor /app/worldmap-viewer/viewer/vendor RUN useradd --uid 8765 --no-create-home --home-dir /nonexistent worldmap-viewer \ && mkdir -p /var/cache/worldmap-viewer/numba && chown -R worldmap-viewer /var/cache/worldmap-viewer USER worldmap-viewer WORKDIR /app/worldmap-viewer EXPOSE 8765 # health check (Quadlet: HealthCmd=; OCI images drop HEALTHCHECK): # python -c "import os, urllib.request as u; u.urlopen('http://127.0.0.1:' + os.environ['WORLDMAP_PORT'] + '/api/worlds', timeout=8)" ENTRYPOINT ["python", "serve.py"]