28 lines
No EOL
711 B
Text
Executable file
28 lines
No EOL
711 B
Text
Executable file
services:
|
|
tianji:
|
|
image: moonrailgun/tianji
|
|
ports:
|
|
- ${DIFFUSION_PORT}:12345
|
|
environment:
|
|
DATABASE_URL: postgresql://tianji:${DBPASS}@postgres:5432/tianji
|
|
JWT_SECRET: ${JWT_KEY}
|
|
ALLOW_REGISTER: "${REGMODE}"
|
|
ALLOW_OPENAPI: "${APIMODE}"
|
|
depends_on:
|
|
- postgres
|
|
restart: always
|
|
|
|
postgres:
|
|
image: postgres:15.4-alpine
|
|
environment:
|
|
POSTGRES_DB: tianji
|
|
POSTGRES_USER: tianji
|
|
POSTGRES_PASSWORD: ${DBPASS}
|
|
volumes:
|
|
- ${DATA_DIR}:/var/lib/postgresql/data
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5 |