feat(deploy): switch to local build and rebrand docker-compose
- Replace upstream image with local Dockerfile build - Rename service/container names to fireflyapi - Update default DB user/name to fireflyapi - Update default admin email to fireflyapi.local - Rename network to fireflyapi-network Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Sub2API Docker Compose Configuration
|
# FireflyAPI Docker Compose Configuration
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Quick Start:
|
# Quick Start:
|
||||||
# 1. Copy .env.example to .env and configure
|
# 1. Copy .env.example to .env and configure
|
||||||
# 2. docker-compose up -d
|
# 2. docker-compose up -d --build
|
||||||
# 3. Check logs: docker-compose logs -f sub2api
|
# 3. 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.
|
||||||
@@ -13,11 +13,14 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Sub2API Application
|
# FireflyAPI Application
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
sub2api:
|
fireflyapi:
|
||||||
image: weishaw/sub2api:latest
|
build:
|
||||||
container_name: sub2api
|
context: ..
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: fireflyapi:latest
|
||||||
|
container_name: fireflyapi
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
@@ -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