# Configuration for tianji setup # Name of the cpn-tianji application name: cpn-tianji # Service definitions for the cpn-tianji application services: # Service name: cpn-tianji # The `cpn-tianji` service definition cpn-tianji: # Name of the container container_name: cpn-tianji # Image to be used for the container image: moonrailgun/tianji:1.31.8 # Container restart policy restart: unless-stopped # Environment variables for the container 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" # Ports mapping between host and container ports: # Mapping port 12345 of the host to port 12345 of the container - "12345:12345" networks: - cpn_tianji_network depends_on: - cpn-tianji-db # Postgres database 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