54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: cpn-tianji
|
|
services:
|
|
app_proxy:
|
|
container_name: cpn-tianji-app-proxy
|
|
environment:
|
|
APP_HOST: cpn_tianji_server_1
|
|
APP_PORT: 12345
|
|
restart: unless-stopped
|
|
networks:
|
|
- cpn_tianji_network
|
|
|
|
cpn-tianji:
|
|
container_name: cpn-tianji
|
|
image: moonrailgun/tianji:1.31.8
|
|
restart: unless-stopped
|
|
environment:
|
|
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"
|
|
|
|
expose:
|
|
- "12345"
|
|
networks:
|
|
- cpn_tianji_network
|
|
depends_on:
|
|
- cpn-tianji-db
|
|
|
|
cpn-tianji-db:
|
|
container_name: cpn-tianji-db
|
|
image: postgres:15.4-alpine
|
|
environment:
|
|
POSTGRES_DB: tianji
|
|
POSTGRES_USER: tianji-user
|
|
POSTGRES_PASSWORD: 227453b7-1286-48cc-b471-1c269495c5fc
|
|
volumes:
|
|
- tianji_pgdata:/var/lib/postgresql/data
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- cpn_tianji_network
|
|
|
|
networks:
|
|
cpn_tianji_network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
tianji_pgdata:
|
|
name: tianji_pgdata
|
|
driver: local |