Files
CasaOS-alexanders-AppStore/Apps/geoguesser-ai/docker-compose.yml
Alexander Hinrichs 7b484d640d fix: configure dedicated network for GeoGuesser AI services
Previously all three services (postgres, backend, frontend) were using
network_mode: bridge, which put them on separate Docker bridge networks
and prevented inter-service communication.

Changes:
- Created dedicated 'geoguesser-ai-network' bridge network
- Connected all three services to this shared network
- Removed deprecated 'external_links' directives
- Services can now communicate via container names (DNS resolution)

This enables:
- Backend to connect to PostgreSQL at 'alxndrhi-geoguesser-ai-postgres'
- Frontend to connect to Backend at 'alxndrhi-geoguesser-ai-backend'
- Proper service isolation from other apps on the system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 23:18:09 +01:00

160 lines
5.3 KiB
YAML

name: alxndrhi-geoguesser-ai
services:
postgres:
container_name: alxndrhi-geoguesser-ai-postgres
image: postgres:16-alpine
environment:
POSTGRES_USER: ${DB_USER:-geolocator}
POSTGRES_PASSWORD: ${DB_PASSWORD:-geolocator_password}
POSTGRES_DB: ${DB_NAME:-geolocator_db}
volumes:
- type: bind
source: /DATA/AppData/$AppID/postgres_data
target: /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-geolocator} -d ${DB_NAME:-geolocator_db}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- geoguesser-ai-network
restart: unless-stopped
backend:
container_name: alxndrhi-geoguesser-ai-backend
image: git.hinrichs.dev/alexander/geoguesser-ai/backend:latest
environment:
ENV: ${ENV:-production}
PORT: ${PORT:-3000}
DATABASE_URL: postgresql://${DB_USER:-geolocator}:${DB_PASSWORD:-geolocator_password}@alxndrhi-geoguesser-ai-postgres:5432/${DB_NAME:-geolocator_db}?sslmode=${DB_SSLMODE:-disable}
CLAUDE_API_KEY: ${CLAUDE_API_KEY}
CLAUDE_API_URL: ${CLAUDE_API_URL:-https://api.anthropic.com/v1/messages}
CLAUDE_MODEL: ${CLAUDE_MODEL:-claude-sonnet-4-5}
USE_MOCK_AI: ${USE_MOCK_AI:-false}
MAX_IMAGE_SIZE_MB: ${MAX_IMAGE_SIZE_MB:-10}
ALLOWED_IMAGE_TYPES: ${ALLOWED_IMAGE_TYPES:-image/jpeg,image/png,image/webp}
OVERPASS_API_URL: ${OVERPASS_API_URL:-https://overpass-api.de/api/interpreter}
ELEVATION_API_URL: ${ELEVATION_API_URL:-https://api.open-elevation.com/api/v1/lookup}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:8080}
LOG_LEVEL: ${LOG_LEVEL:-info}
LOG_FORMAT: ${LOG_FORMAT:-json}
volumes:
- type: bind
source: /DATA/AppData/$AppID/uploads
target: /app/uploads
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- geoguesser-ai-network
restart: unless-stopped
frontend:
container_name: alxndrhi-geoguesser-ai-frontend
image: git.hinrichs.dev/alexander/geoguesser-ai/frontend:latest
ports:
- target: 8080
published: "8080"
protocol: tcp
depends_on:
- backend
networks:
- geoguesser-ai-network
restart: unless-stopped
x-casaos:
envs:
- container: ENV
description:
en_us: Application environment (development/production)
- container: PORT
description:
en_us: Backend API port
- container: DB_USER
description:
en_us: PostgreSQL database username
- container: DB_PASSWORD
description:
en_us: PostgreSQL database password
- container: DB_NAME
description:
en_us: PostgreSQL database name
- container: DB_SSLMODE
description:
en_us: PostgreSQL SSL mode (disable/require)
- container: CLAUDE_API_KEY
description:
en_us: Anthropic Claude API key for AI analysis
- container: CLAUDE_API_URL
description:
en_us: Claude API endpoint URL
- container: CLAUDE_MODEL
description:
en_us: Claude model identifier to use
- container: USE_MOCK_AI
description:
en_us: Use mock AI responses (true/false)
- container: MAX_IMAGE_SIZE_MB
description:
en_us: Maximum upload image size in MB
- container: ALLOWED_IMAGE_TYPES
description:
en_us: Comma-separated list of allowed image MIME types
- container: OVERPASS_API_URL
description:
en_us: OpenStreetMap Overpass API endpoint
- container: ELEVATION_API_URL
description:
en_us: Elevation data API endpoint
- container: ALLOWED_ORIGINS
description:
en_us: CORS allowed origins (comma-separated)
- container: LOG_LEVEL
description:
en_us: Application log level (debug/info/warn/error)
- container: LOG_FORMAT
description:
en_us: Log output format (json/text)
ports:
- container: "8080"
description:
en_us: Web UI HTTP Port
volumes:
- container: /var/lib/postgresql/data
description:
en_us: PostgreSQL database storage
- container: /app/uploads
description:
en_us: Uploaded images storage
networks:
geoguesser-ai-network:
driver: bridge
name: geoguesser-ai-network
x-casaos:
architectures:
- amd64
- arm64
main: frontend
author: Alexander Hinrichs
category: Utilities
developer: Alexander Hinrichs
description:
en_us: An AI-powered geographic image analyzer that uses Claude AI to
identify locations from photos. Upload images and get detailed
geolocation analysis including coordinates, landmarks, and contextual
information. Requires Anthropic API key for Claude AI access.
tagline:
en_us: AI-powered geographic image location analyzer
icon: https://git.ct.hinrichs.dev/alexander/CasaOS-alexanders-AppStore/raw/branch/main/Apps/geoguesser-ai/icon.png
index: /
port_map: "8080"
scheme: http
title:
en_us: GeoGuesser AI