Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
target/
node_modules/
test-data/
data/
.env
.git/
*.pmtiles
docs/
scripts/
CONTRIBUTING.md
LICENSE
27 changes: 27 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
atlas:
build: .
ports:
- "${ATLAS_EXTERNAL_PORT:-8080}:80"
volumes:
- ${ATLAS_DATA_DIR:-./test-data}:/data:ro
env_file:
- path: .env
required: false
environment:
- ATLAS_TILE_SOURCE=local
- ATLAS_TILE_DIR=/data
- ATLAS_GEOCODE_INDEX_DIR=/data/geocode-index
- ATLAS_LANDMARK_PATH=/data/landmarks.bin
- ATLAS_PLACES_PATH=/data/places.bin
- ATLAS_SEARCH_INDEX_DIR=/data/search-index
- ATLAS_ROUTE_DIR=/data
- ATLAS_OSM_DIR=/data/osm
- ATLAS_PUBLIC_URL=${ATLAS_PUBLIC_URL:-http://localhost:8080}
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3001/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
57 changes: 57 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/wasm;

upstream atlas_api {
server 127.0.0.1:3001;
}

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;

# API proxy
location /v1/ {
proxy_pass http://atlas_api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /health {
proxy_pass http://atlas_api;
}

location /metrics {
proxy_pass http://atlas_api;
}

# Frontend — SPA fallback
location / {
try_files $uri $uri/ /index.html;
}

# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}
}