diff --git a/Dockerfile b/Dockerfile index 0c6e20c..f1a6cc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,9 @@ RUN chmod +x /app/scripts/build-tiles.sh /app/scripts/build-tiles.py ENTRYPOINT ["/app/scripts/build-tiles.sh"] FROM nginx:1.27-alpine AS tile-server +RUN apk add --no-cache python3 COPY nginx/default.conf /etc/nginx/conf.d/default.conf +COPY nginx/00-callback-provider-cache.conf /etc/nginx/conf.d/00-callback-provider-cache.conf +COPY scripts/callback_provider.py /usr/local/bin/callback-provider.py +COPY nginx/render-callback-provider.sh /docker-entrypoint.d/40-render-callback-provider.sh +RUN chmod +x /docker-entrypoint.d/40-render-callback-provider.sh diff --git a/docker-compose.yml b/docker-compose.yml index f8a8155..5ab1da8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,11 +6,14 @@ services: environment: SOURCE_DIR: /app/source DATA_DIR: /var/lib/arma-tiles + TILES_DIR: /output/tiles MAPS_CONFIG: /app/config/maps.json GDAL2TILES_PROCESSES: ${GDAL2TILES_PROCESSES:-1} + CALLBACK_PROVIDER: ${CALLBACK_PROVIDER:-} volumes: - ${ARMA_TILES_SOURCE_DIR:-./source}:/app/source:ro - arma_tiles_data:/var/lib/arma-tiles + - ./tiles:/output/tiles restart: "no" tiles: @@ -21,9 +24,13 @@ services: tile-builder: condition: service_completed_successfully ports: - - "${HTTP_PORT:-8080}:80" + - "${HTTP_PORT:-9000}:80" + environment: + CALLBACK_PROVIDER: ${CALLBACK_PROVIDER:-} volumes: - - arma_tiles_data:/var/lib/arma-tiles:ro + - ./tiles:/var/lib/arma-tiles/tiles:ro + - callback_provider_cache:/var/cache/nginx volumes: arma_tiles_data: + callback_provider_cache: