Open
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
Metadata
Metadata
Assignees
Labels
No labels