# RasterizedDB with Docker Compose: one server, a named volume, a # healthcheck and a restart policy. Copy .env.example to .env first. name: rasterizeddb services: rasterizeddb: image: ${RASTERIZEDDB_IMAGE:-milendenev/rasterizeddb:1.1.0} environment: # The password of the role `rasterized`, set on the first start. RASTERIZEDDB_PG_PASSWORD: ${RASTERIZEDDB_PG_PASSWORD:?set RASTERIZEDDB_PG_PASSWORD in .env} # Extra server flags, added to the image's own. Remove or extend. command: ["--log-level", "warn"] ports: # 127.0.0.1 keeps the ports on this machine. Drop the address to # accept connections from other machines. - "127.0.0.1:5432:5432" # PostgreSQL protocol - "127.0.0.1:61170:61170" # native protocol (rasterizeddb_client, Studio) volumes: - data:/var/lib/rasterizeddb restart: unless-stopped stop_grace_period: 60s healthcheck: # The image has bash but no SQL client: this checks that the # PostgreSQL port accepts a connection. test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/5432"] interval: 10s timeout: 5s retries: 6 start_period: 30s volumes: data: