services: postgres: image: docker.m.daocloud.io/library/postgres:16-alpine container_name: celestia-postgres restart: unless-stopped environment: POSTGRES_USER: ${DB_USER:-celestia} POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required} POSTGRES_DB: ${DB_NAME:-celestia_trace} volumes: - pgdata:/var/lib/postgresql/data ports: - "5433:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-celestia} -d ${DB_NAME:-celestia_trace}"] interval: 5s timeout: 5s retries: 5 backend: build: . container_name: celestia-backend restart: unless-stopped depends_on: postgres: condition: service_healthy environment: DB_HOST: postgres DB_PORT: 5432 DB_USER: ${DB_USER:-celestia} DB_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required} DB_NAME: ${DB_NAME:-celestia_trace} JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required} ACCESS_TOKEN_TTL: ${ACCESS_TOKEN_TTL:-30m} REFRESH_TOKEN_TTL: ${REFRESH_TOKEN_TTL:-720h} STORAGE_PATH: /data/uploads SERVER_PORT: 8080 GIN_MODE: release expose: - "8080" volumes: - uploads:/data/uploads networks: default: proxy: aliases: - celestia-backend healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/v1/health >/dev/null || exit 1"] interval: 10s timeout: 3s retries: 5 start_period: 10s logging: driver: json-file options: max-size: "10m" max-file: "3" volumes: pgdata: uploads: networks: proxy: name: meishi_ccdw_life_default external: true