msgbyte / msgbyte/tianji

Error in Dokploy

Open
#182 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
194
Avg merge
18m
Merged PRs (30d)
3

Description

Hi all,

after trying to install tianji I failed hard. I use dokploy to run the containers. I have no clue what I'm doing wrong. Hope you guys can help.

docker-compose.yaml

services:
  tianji:
    image: moonrailgun/tianji:1.19.5
    environment:
      DATABASE_URL: postgresql://tianji:tianji@postgres:5432/tianji?connect_timeout=300&pool_timeout=300
      ALLOW_REGISTER: "false"
      ALLOW_OPENAPI: "true"
      JWT_SECRET: "something"
      OPENAI_API_KEY: "something"
    depends_on:
      postgres:
        condition: service_healthy
    restart: always
  postgres:
    image: postgres:15.4-alpine
    environment:
      POSTGRES_DB: tianji
      POSTGRES_USER: tianji
      POSTGRES_PASSWORD: tianji
      POSTGRES_HOST_AUTH_METHOD: trust
      PGDATA: /var/lib/postgresql/data/pgdata
    volumes:
      - tianji-db-data:/var/lib/postgresql/data
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  tianji-db-data:
> tianji@1.19.5 start:docker /app/tianji
> pnpm start:docker:db && pnpm start
> tianji@1.19.5 start:docker:db /app/tianji
> cd src/server && pnpm db:migrate:apply && pnpm db:migrate:script
> @tianji/server@ db:migrate:apply /app/tianji/src/server
> prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "tianji", schema "public" at "postgres:5432"
Error: P1001: Can't reach database server at `postgres:5432`
Please make sure your database server is running at `postgres:5432`.
ELIFECYCLE  Command failed with exit code 1.
ELIFECYCLE  Command failed with exit code 1.
ELIFECYCLE  Command failed with exit code 1.

Even my network looks good:

[
  {
        "Name": "tianji-fdhsdz_default",
        "Id": "78a7b789e94e21f09244f8c11de34722bd4a1260a14704db35813d29498f857c",
        "Created": "2025-03-29T03:26:26.909727928+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv4": true,
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.0.0/16",
                    "Gateway": "172.20.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "2d9954b2783de1f7756861bb695f656652f0bb9fd8a5eb74df94ff04b0ea49ac": {
                "Name": "tianji-fdhsdz-postgres-1",
                "EndpointID": "e73e9fcc199a6a0b55cfb5e646f9b2248590030f3641aaaacb690b9f8cc7c019",
                "MacAddress": "52:7c:9c:7e:b2:ee",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.config-hash": "5f1fc8c03a5eb44752d367236fd19b72e0603eb82c5e8acd83194e4cd2fe2bd3",
            "com.docker.compose.network": "default",
            "com.docker.compose.project": "tianji-fdhsdz",
            "com.docker.compose.version": "2.33.1"
        }
    }
]

Thank you and best regards
Davian

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docker-compose.yaml and the PostgreSQL container's health and logs; then inspect src/server/prisma/schema.prisma and the migration command shown in the startup output. Reproduce the deployment and identify why the tianji container cannot reach postgres:5432; done means a documented configuration or confirmed application fix, with migrations completing.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgresql
Domain
database, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.