name: akyldash services: caddy: image: caddy:2.11.6-alpine@sha256:881bbc60f9986d5ab8e7cfd6cf7e4ef3c9c0439fef2429d035d065577882f028 restart: unless-stopped logging: driver: local options: max-size: 10m max-file: "3" ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config networks: - proxy depends_on: backend: condition: service_healthy healthcheck: test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://127.0.0.1:2019/config/"] interval: 30s timeout: 5s retries: 3 opensearch: image: ${OPENSEARCH_IMAGE:-akyldash/opensearch:local} build: context: ../.. dockerfile: deploy/production/Dockerfile.opensearch restart: unless-stopped logging: driver: local options: max-size: 10m max-file: "3" environment: discovery.type: single-node bootstrap.memory_lock: "true" DISABLE_SECURITY_PLUGIN: "true" OPENSEARCH_JAVA_OPTS: ${OPENSEARCH_JAVA_OPTS:--Xms2g -Xmx2g} mem_limit: ${OPENSEARCH_MEM_LIMIT:-4g} expose: - "9200" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 hard: 65536 volumes: - opensearch-data:/usr/share/opensearch/data networks: - search healthcheck: test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:9200/_cluster/health || exit 1"] interval: 30s timeout: 10s retries: 10 backend: image: ${BACKEND_IMAGE:-akyldash/backend:local} build: context: ../.. dockerfile: deploy/production/Dockerfile.backend restart: unless-stopped logging: driver: local options: max-size: 10m max-file: "3" environment: COOKIE_SECURE: ${COOKIE_SECURE:-true} command: - python - -m - search.api - --host - 0.0.0.0 - --port - "8080" - --url - http://opensearch:9200 - --index - ${SEARCH_INDEX:-akyldash-fragments-current} - --data - /app/data/minjust-normalized - --reviews-db - /app/data/search-reviews.sqlite3 - --users-db - /app/data/search-users.sqlite3 - --review-secret-file - /run/secrets/review_secret secrets: - review_secret expose: - "8080" depends_on: opensearch: condition: service_healthy volumes: - ${DATA_ROOT:?set DATA_ROOT in .env}:/app/data networks: - proxy - search volumes: caddy-data: caddy-config: opensearch-data: networks: proxy: search: internal: true secrets: review_secret: file: ${REVIEW_SECRET_FILE:?set REVIEW_SECRET_FILE in .env}