Skip to content

Commit

Permalink
Rebase repo (#46)
Browse files Browse the repository at this point in the history
* Rebase repo

* more cleanup

* some nice features

* fix repoi title

* fix ignore
  • Loading branch information
andersakerberg authored Nov 16, 2024
1 parent 9262c85 commit 8f2074b
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ __pycache__/
*.pdb

# Docker
docker-compose.override.yml
docker-compose.*.yml
docker-compose.yml
*.log
*.pid
*.seed
Expand Down
77 changes: 77 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
services:
ollama:
volumes:
- ollama:/root/.ollama
- ./scripts/ollama.sh:/entrypoint.sh
environment:
- MODELS_BASE=${MODELS_BASE}
# Visit https://ollama.com/search for a list of
# available models and add to the MODELS_EXTRA array in .env
- MODELS_EXTRA=${MODELS_EXTRA}
container_name: ollama
pull_policy: always
tty: true
restart: unless-stopped
network_mode: host
image: ollama/ollama:latest
entrypoint: ["/usr/bin/bash", "/entrypoint.sh"]

open-webui:
image: ghcr.io/open-webui/open-webui:latest
container_name: open-webui
volumes:
- open-webui:/app/backend/data
- open-webui-data:/app/data
- ./scripts/openwebui.sh:/app/backend/openwebui.sh
environment:
- DATA_DIR=/app/data
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DATABASE}
- NVIDIA_VISIBLE_DEVICES=all
- WEBUI_NAME=AIXCL
- "OLLAMA_BASE_URL=http://localhost:11434"
- OPENWEBUI_EMAIL=${OPENWEBUI_EMAIL}
- OPENWEBUI_PASSWORD=${OPENWEBUI_PASSWORD}
depends_on:
- postgres
- ollama
network_mode: host
restart: always
command: ["/bin/bash", "-c", "chmod +x openwebui.sh && bash openwebui.sh"]

postgres:
image: postgres:latest
container_name: postgres
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DATABASE
volumes:
- postgres-data:/var/lib/postgresql/data
network_mode: host
restart: always

pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: $PGADMIN_EMAIL
PGADMIN_DEFAULT_PASSWORD: $PGADMIN_PASSWORD
PGADMIN_LISTEN_PORT: 5050
network_mode: host
depends_on:
- postgres
restart: always

watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: open-webui
restart: always

volumes:
ollama:
open-webui:
open-webui-data:
postgres-data:

0 comments on commit 8f2074b

Please sign in to comment.