Updated Tianji

This commit is contained in:
2026-01-19 23:18:45 +01:00
parent f3ef17102a
commit cb683d668e
2 changed files with 16 additions and 37 deletions

View File

@@ -1,56 +1,40 @@
version: "3.8"
name: cpn-tianji
services:
cpn-tianji:
image: moonrailgun/tianji:1.31.8@sha256:86b58556fa9ff5454cb4eeddc2330124244733820a56b5491c8c0e4399880c68
container_name: cpn-tianji
hostname: cpn-tianji
image: moonrailgun/tianji:1.31.8@sha256:86b58556fa9ff5454cb4eeddc2330124244733820a56b5491c8c0e4399880c68
restart: unless-stopped
stop_grace_period: 1m
ports:
- ${APP_TIANJI_PORT:-12345}:12345
environment:
DATABASE_URL: postgresql://tianji-user:${APP_PASSWORD}@cpn-tianji-db:5432/tianji
JWT_SECRET: ${APP_SEED}
DATABASE_URL: postgresql://tianji-user:227453b7-1286-48cc-b471-1c269495c5fc@cpn-tianji-db:5432/tianji
JWT_SECRET: replace-me-with-a-random-string
ALLOW_REGISTER: "false"
ALLOW_OPENAPI: "true"
PUBLIC_URL: "http://${DEVICE_DOMAIN_NAME}:${APP_TIANJI_PORT:-12345}"
volumes:
- ${APP_DATA_DIR}/data/configs:/app/data/configs
- ${APP_DATA_DIR}/data/icons:/app/public/icons
- ${APP_DATA_DIR}/data:/data
depends_on:
cpn-tianji-db:
condition: service_healthy
ports:
- "12345:12345"
networks:
- cpn_tianji_network
depends_on:
- cpn-tianji-db
cpn-tianji-db:
image: postgres:15.4-alpine
container_name: cpn-tianji-db
hostname: cpn-tianji-db
restart: unless-stopped
image: postgres:15.4-alpine
environment:
POSTGRES_DB: tianji
POSTGRES_USER: tianji-user
POSTGRES_PASSWORD: ${APP_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: 227453b7-1286-48cc-b471-1c269495c5fc
volumes:
- tianji_pgdata:/var/lib/postgresql/data/pgdata
- tianji_pgdata:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tianji-user -d tianji"]
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 30s
networks:
- cpn_tianji_network
networks:
cpn_tianji_network:
name: cpn_tianji_network
driver: bridge
volumes:
tianji_pgdata:
name: tianji_pgdata