perfect-postcode/docker-compose.yml
2026-02-19 22:55:38 +00:00

163 lines
4.7 KiB
YAML

x-credentials:
pb-email: &pb-email admin@propertymap.local
pb-password: &pb-password propertymap-dev-2024
services:
server:
image: rust:1.84
init: true
working_dir: /app/server-rs
command: >
bash -c "
cargo install cargo-watch &&
cargo watch -i logs/ -x 'run -- --properties /app/data/properties.parquet --postcode-features /app/data/postcode.parquet --listings-buy /app/data-scraped/online_listings_buy.parquet --listings-rent /app/data-scraped/online_listings_rent.parquet --pois /app/data/filtered_uk_pois.parquet --places /app/data/places.parquet --tiles /app/data/uk.pmtiles --postcodes /app/data/postcode_boundaries --travel-times /app/data/travel-times'
"
ports:
- "8001:8001"
networks:
- dev-network
cap_add:
- IPC_LOCK
ulimits:
memlock:
soft: -1
hard: -1
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/app
- cargo-home:/usr/local/cargo
- cargo-target:/app/server-rs/target
- ./property-data:/app/data:ro
- ./property-data/travel-times:/app/data/travel-times:ro
- /volumes/narrowit/property-data/scraped:/app/data-scraped:ro
environment:
POCKETBASE_URL: http://pocketbase:8090
POCKETBASE_ADMIN_EMAIL: *pb-email
POCKETBASE_ADMIN_PASSWORD: *pb-password
SCREENSHOT_URL: http://screenshot:8002
OLLAMA_URL: http://host.docker.internal:11434
OLLAMA_MODEL: gpt-oss:20b
PUBLIC_URL: https://perfectpostcodes.schmelczer.dev
GOOGLE_MAPS_API_KEY: "AIzaSyBgBn9LjrxHCjb9j1LZbLYpEdCJj-NkHPY"
STRIPE_SECRET_KEY: sk_test_51SyVcePRjj2bdyn1HLkatQ5onwp8kamm41tjMcRdxXnJYWVPsVd9usMTOSNtNdGhrjbsrtNbgTdKXICg2qBiocEn00PvNDC0d3
STRIPE_WEBHOOK_SECRET: whsec_pIkGZblYlcN2VesTxq4pk1cDqdxOQ1y0
STRIPE_REFERRAL_COUPON_ID: L5uQqagl
GOOGLE_OAUTH_CLIENT_ID: 536485512604-740bbn3tf027ogrdcr5sqor4ntorkaqv.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET: 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
depends_on:
screenshot:
condition: service_healthy
pocketbase:
condition: service_healthy
screenshot:
init: true
build: /volumes/syncthing/Projects/property-map/screenshot
environment:
APP_URL: http://frontend:3001
CACHE_DIR: /cache
volumes:
- screenshot-cache:/cache
networks:
- dev-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
frontend:
init: true
image: node:22-slim
working_dir: /app/frontend
command: >
bash -c "
npm install &&
npm run dev
"
ports:
- "3001:3001"
networks:
- dev-network
volumes:
- .:/app
- frontend-node-modules:/app/frontend/node_modules
environment:
API_PROXY_TARGET: http://server:8001
PB_PROXY_TARGET: http://pocketbase:8090
pocketbase:
init: true
image: ghcr.io/muchobien/pocketbase:latest
ports:
- "8090:8090"
volumes:
- pb-data:/pb/pb_data
networks:
- dev-network
environment:
PB_ADMIN_EMAIL: *pb-email
PB_ADMIN_PASSWORD: *pb-password
PB_TRUSTED_PROXY: server
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
# gluetun:
# image: qmcgaw/gluetun:v3.40.4
# volumes:
# - gluetun-cache-v2:/gluetun
# - gluetun-auth:/gluetun/auth:ro
# environment:
# # See https://github.com/qdm12/gluetun-wiki/tree/main/setup#setup
# VPN_SERVICE_PROVIDER: mullvad
# VPN_TYPE: wireguard
# WIREGUARD_PRIVATE_KEY: "8FFKmtTvDsZlShnKl/opDDwCwb9v2ox4+Kkl3wX+9Gw="
# WIREGUARD_ADDRESSES: "10.66.109.86/32"
# OWNED_ONLY: "yes"
# UPDATER_PERIOD: 24h
# SERVER_COUNTRIES: Serbia,Slovakia,Croatia,Austria,Denmark,Finland
# TZ: $TIME_ZONE
# restart: unless-stopped
# ports:
# - "1234:1234"
# healthcheck:
# test: "wget -q https://www.google.com || exit 1"
# interval: 1m
# timeout: 15s
# retries: 2
# cap_add:
# - NET_ADMIN
# devices:
# - /dev/net/tun:/dev/net/tun
# finder:
# build:
# context: .
# dockerfile: Dockerfile.finder
# init: true
# network_mode: service:gluetun
# volumes:
# - ./finder:/app
# depends_on:
# gluetun:
# condition: service_healthy
# restart: unless-stopped
volumes:
pb-data:
cargo-home:
cargo-target:
frontend-node-modules:
screenshot-cache:
gluetun-cache-v2:
gluetun-auth:
networks:
dev-network: