mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 13:55:41 +01:00
67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- private-gpt
|
|
|
|
private-gpt:
|
|
build:
|
|
dockerfile: Dockerfile.external
|
|
entrypoint: ./docker-entrypoint.sh
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./local_data/:/home/worker/app/local_data
|
|
ports:
|
|
- 8000:8000
|
|
depends_on:
|
|
- db
|
|
- ollama
|
|
environment:
|
|
PORT: 8000
|
|
PGPT_PROFILES: docker
|
|
PGPT_MODE: ollama
|
|
DATABASE_URL: postgresql+psycopg2://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_NAME}
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
container_name: ollama
|
|
volumes:
|
|
- ./models:/root/.ollama
|
|
pull_policy: always
|
|
tty: true
|
|
restart: unless-stopped
|
|
ports:
|
|
- 11434:11434
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
capabilities: [ "gpu" ]
|
|
count: all
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: db
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
# POSTGRES_HOST_AUTH_METHOD: trust
|
|
restart: always
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
ports:
|
|
- 5433:${DB_PORT}
|
|
|
|
volumes:
|
|
postgres-data:
|