Files
honeyDueAPI/docker-compose.dev.yml
T
Trey t 9ea058347f
Backend CI / Test (push) Has been cancelled
Backend CI / Contract Tests (push) Has been cancelled
Backend CI / Build (push) Has been cancelled
Backend CI / Lint (push) Has been cancelled
Backend CI / Secret Scanning (push) Has been cancelled
Fix Apple Sign In: update bundle IDs from old com.tt.honeyDue.* to com.myhoneydue.*
The iOS app was renamed (MyCrib → Casera → honeyDue) and the bundle ID
was updated to com.myhoneydue.honeyDue (release) / .dev (debug), but
APPLE_CLIENT_ID and APNS_TOPIC across env templates and k3s configs
still pointed at the old com.tt.honeyDue.honeyDueDev value. This made
verifyAudience reject every Apple identity token (aud claim mismatch).

Updated:
- deploy/prod.env.example: bundle ID + comment that empty client_id
  rejects all tokens with DEBUG=false
- .env.example: add Sign in with Apple block (was missing entirely)
- deploy-k3s{,-dev}/config.yaml.example: apple_auth.client_id default
- deploy-k3s-dev/scripts/00-init.sh: same
- docker-compose.dev.yml: APNS_TOPIC fallback
- docs/deployment/10-secrets-config.md: doc reference

The live deploy/prod.env and local .env are .gitignored — they were
edited in place and need to ship via deploy_prod.sh to take effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 23:58:44 -05:00

208 lines
5.5 KiB
YAML

# Local development compose file (self-contained, no base file needed)
# Usage:
# docker compose -f docker-compose.dev.yml up --build
services:
# PostgreSQL Database
db:
image: postgres:16-alpine
container_name: honeydue-db
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-honeydue}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-honeydue_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-honeydue}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${DB_PORT:-5433}:5432" # 5433 externally to avoid conflicts with local postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-honeydue} -d ${POSTGRES_DB:-honeydue}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- honeydue-network
# Redis Cache
redis:
image: redis:7-alpine
container_name: honeydue-redis
restart: unless-stopped
command: redis-server --appendonly yes
volumes:
- redis_data:/data
ports:
- "${REDIS_PORT:-6379}:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- honeydue-network
# honeyDue API
api:
build:
context: .
target: api
container_name: honeydue-api
restart: unless-stopped
ports:
- "${PORT:-8000}:8000"
environment:
# Server
PORT: "8000"
DEBUG: "true"
DEBUG_FIXED_CODES: "true"
ALLOWED_HOSTS: "localhost,127.0.0.1"
TIMEZONE: "${TIMEZONE:-UTC}"
# Database
DB_HOST: db
DB_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-honeydue}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-honeydue_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-honeydue}
DB_SSLMODE: "disable"
# Redis
REDIS_URL: "redis://redis:6379/0"
# Security
SECRET_KEY: ${SECRET_KEY:-dev-secret-key-change-in-production-min-32-chars}
# Email
EMAIL_HOST: ${EMAIL_HOST:-smtp.gmail.com}
EMAIL_PORT: ${EMAIL_PORT:-587}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-honeyDue <noreply@honeyDue.treytartt.com>}
EMAIL_USE_TLS: "true"
# Push Notifications
APNS_AUTH_KEY_PATH: ${APNS_AUTH_KEY_PATH}
APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID}
APNS_TEAM_ID: ${APNS_TEAM_ID}
APNS_TOPIC: ${APNS_TOPIC:-com.myhoneydue.honeyDue.dev}
APNS_USE_SANDBOX: "true"
FCM_SERVER_KEY: ${FCM_SERVER_KEY}
# Storage encryption
STORAGE_ENCRYPTION_KEY: ${STORAGE_ENCRYPTION_KEY}
volumes:
- ./push_certs:/certs:ro
- ./uploads:/app/uploads
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8000/api/health/"]
interval: 30s
timeout: 10s
start_period: 10s
retries: 3
networks:
- honeydue-network
# honeyDue Admin Panel (Next.js)
admin:
build:
context: .
target: admin
container_name: honeydue-admin
restart: unless-stopped
ports:
- "${ADMIN_PORT:-3000}:3000"
environment:
PORT: "3000"
HOSTNAME: "0.0.0.0"
NEXT_PUBLIC_API_URL: "${NEXT_PUBLIC_API_URL:-http://api:8000}"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/"]
interval: 30s
timeout: 10s
retries: 3
networks:
- honeydue-network
# honeyDue Worker (Background Jobs)
worker:
build:
context: .
target: worker
container_name: honeydue-worker
restart: unless-stopped
environment:
# Database
DB_HOST: db
DB_PORT: "5432"
POSTGRES_USER: ${POSTGRES_USER:-honeydue}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-honeydue_dev_password}
POSTGRES_DB: ${POSTGRES_DB:-honeydue}
DB_SSLMODE: "disable"
# Redis
REDIS_URL: "redis://redis:6379/0"
# Security
SECRET_KEY: ${SECRET_KEY:-dev-secret-key-change-in-production-min-32-chars}
# Push Notifications
APNS_AUTH_KEY_PATH: "/certs/apns_key.p8"
APNS_AUTH_KEY_ID: ${APNS_AUTH_KEY_ID}
APNS_TEAM_ID: ${APNS_TEAM_ID}
APNS_TOPIC: ${APNS_TOPIC:-com.myhoneydue.honeyDue.dev}
APNS_USE_SANDBOX: "true"
FCM_SERVER_KEY: ${FCM_SERVER_KEY}
# Email
EMAIL_HOST: ${EMAIL_HOST:-smtp.gmail.com}
EMAIL_PORT: ${EMAIL_PORT:-587}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
DEFAULT_FROM_EMAIL: ${DEFAULT_FROM_EMAIL:-honeyDue <noreply@honeyDue.treytartt.com>}
EMAIL_USE_TLS: "true"
# Worker settings (UTC hours for scheduled jobs)
TASK_REMINDER_HOUR: ${TASK_REMINDER_HOUR:-14}
OVERDUE_REMINDER_HOUR: ${OVERDUE_REMINDER_HOUR:-15}
DAILY_DIGEST_HOUR: ${DAILY_DIGEST_HOUR:-3}
volumes:
- ./push_certs:/certs:ro
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- honeydue-network
# Dozzle — lightweight real-time log viewer
dozzle:
image: amir20/dozzle:latest
container_name: honeydue-dozzle
restart: unless-stopped
ports:
- "${DOZZLE_PORT:-9999}:8080"
environment:
DOZZLE_NO_ANALYTICS: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- honeydue-network
volumes:
postgres_data:
redis_data:
networks:
honeydue-network:
driver: bridge