Change port database in file docker-compose.yml #2909
-
The port 5432 for database postgres in my server is busy and I do not want to stop this port. Help me change the port database in file docker-compose.yml so that it can run smoothly: services: db: volumes: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
To change the PostgreSQL port in your services:
langfuse-server:
image: langfuse/langfuse:2
depends_on:
db:
condition: service_healthy
ports:
- "4000:3000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5433/postgres
- NEXTAUTH_SECRET=mysecret
- SALT=mysalt
- ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 # generate via `openssl rand -hex 32`
- NEXTAUTH_URL=http://localhost:4000
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-true}
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}
db:
image: postgres
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- 5433:5432
volumes:
- database_data:/var/lib/postgresql/data
volumes:
database_data:
driver: local In this example, the |
Beta Was this translation helpful? Give feedback.
-
You can just use another port in the docker compose config for the db, should be simple |
Beta Was this translation helpful? Give feedback.
You can just use another port in the docker compose config for the db, should be simple