Compare commits
4 Commits
58081d0a68
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66d72c7b3b | ||
|
|
90c36bb559 | ||
|
|
8a22b95906 | ||
|
|
51d8badb05 |
@@ -1,30 +1,33 @@
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Sub2API Docker Compose Configuration
|
# FireflyAPI Docker Compose Configuration
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Quick Start:
|
# Quick Start:
|
||||||
# 1. Copy .env.example to .env and configure
|
# 1. Build image: docker build -t fireflyapi:latest . (in project root)
|
||||||
# 2. docker-compose up -d
|
# 2. Copy .env.example to .env and configure
|
||||||
# 3. Check logs: docker-compose logs -f sub2api
|
# 3. docker-compose up -d
|
||||||
|
# 4. Check logs: docker-compose logs -f fireflyapi
|
||||||
# 4. Access: http://localhost:8080
|
# 4. Access: http://localhost:8080
|
||||||
#
|
#
|
||||||
# All configuration is done via environment variables.
|
# All configuration is done via environment variables.
|
||||||
# No Setup Wizard needed - the system auto-initializes on first run.
|
# No Setup Wizard needed - the system auto-initializes on first run.
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
name: fireflyapi
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Sub2API Application
|
# FireflyAPI Application
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
sub2api:
|
fireflyapi:
|
||||||
image: weishaw/sub2api:latest
|
image: fireflyapi:latest
|
||||||
container_name: sub2api
|
container_name: fireflyapi
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 100000
|
soft: 100000
|
||||||
hard: 100000
|
hard: 100000
|
||||||
ports:
|
ports:
|
||||||
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8080}:8080"
|
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-6680}:8080"
|
||||||
volumes:
|
volumes:
|
||||||
# Data persistence (config.yaml will be auto-generated here)
|
# Data persistence (config.yaml will be auto-generated here)
|
||||||
- sub2api_data:/app/data
|
- sub2api_data:/app/data
|
||||||
@@ -50,9 +53,9 @@ services:
|
|||||||
# =======================================================================
|
# =======================================================================
|
||||||
- DATABASE_HOST=postgres
|
- DATABASE_HOST=postgres
|
||||||
- DATABASE_PORT=5432
|
- DATABASE_PORT=5432
|
||||||
- DATABASE_USER=${POSTGRES_USER:-sub2api}
|
- DATABASE_USER=${POSTGRES_USER:-fireflyapi}
|
||||||
- DATABASE_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
- DATABASE_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
||||||
- DATABASE_DBNAME=${POSTGRES_DB:-sub2api}
|
- DATABASE_DBNAME=${POSTGRES_DB:-fireflyapi}
|
||||||
- DATABASE_SSLMODE=disable
|
- DATABASE_SSLMODE=disable
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
@@ -67,7 +70,7 @@ services:
|
|||||||
# =======================================================================
|
# =======================================================================
|
||||||
# Admin Account (auto-created on first run)
|
# Admin Account (auto-created on first run)
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@sub2api.local}
|
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@fireflyapi.local}
|
||||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
@@ -133,7 +136,7 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- sub2api-network
|
- fireflyapi-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -146,7 +149,7 @@ services:
|
|||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:18-alpine
|
image: postgres:18-alpine
|
||||||
container_name: sub2api-postgres
|
container_name: fireflyapi-postgres
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
@@ -155,14 +158,14 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${POSTGRES_USER:-sub2api}
|
- POSTGRES_USER=${POSTGRES_USER:-fireflyapi}
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
|
||||||
- POSTGRES_DB=${POSTGRES_DB:-sub2api}
|
- POSTGRES_DB=${POSTGRES_DB:-fireflyapi}
|
||||||
- TZ=${TZ:-Asia/Shanghai}
|
- TZ=${TZ:-Asia/Shanghai}
|
||||||
networks:
|
networks:
|
||||||
- sub2api-network
|
- fireflyapi-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-sub2api} -d ${POSTGRES_DB:-sub2api}"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-fireflyapi} -d ${POSTGRES_DB:-fireflyapi}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -175,7 +178,7 @@ services:
|
|||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
redis:
|
redis:
|
||||||
image: redis:8-alpine
|
image: redis:8-alpine
|
||||||
container_name: sub2api-redis
|
container_name: fireflyapi-redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
@@ -195,7 +198,7 @@ services:
|
|||||||
# REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag)
|
# REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag)
|
||||||
- REDISCLI_AUTH=${REDIS_PASSWORD:-}
|
- REDISCLI_AUTH=${REDIS_PASSWORD:-}
|
||||||
networks:
|
networks:
|
||||||
- sub2api-network
|
- fireflyapi-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -218,5 +221,5 @@ volumes:
|
|||||||
# Networks
|
# Networks
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
networks:
|
networks:
|
||||||
sub2api-network:
|
fireflyapi-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|||||||
Reference in New Issue
Block a user