mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
Merge pull request #16 from senju1337/fix/docker-was-broken
this fixes the docker container, it previously couldnt start the senju webserice
This commit is contained in:
commit
91e4567bf6
3 changed files with 11 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
FROM python:3.12-alpine AS base
|
FROM python:3.12-alpine AS base
|
||||||
|
|
||||||
# VENV not needed in docker container
|
ENV POETRY_VIRTUALENVS_CREATE=true
|
||||||
ENV POETRY_VIRTUALENVS_CREATE=false
|
ENV FLASK_APP=senju/main.py
|
||||||
|
|
||||||
COPY ./entrypoint.sh /
|
COPY ./entrypoint.sh /
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,18 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5000:5000"
|
- "127.0.0.1:5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./senju:/app
|
- ./senju:/app/senju
|
||||||
depends_on:
|
depends_on:
|
||||||
- ollama
|
- ollama
|
||||||
|
|
||||||
ollama:
|
ollama:
|
||||||
image: docker.io/ollama/ollama
|
image: docker.io/ollama/ollama
|
||||||
volumes:
|
volumes:
|
||||||
- ./ollama:/root/.ollama
|
- ollama:/root/.ollama
|
||||||
container_name: ollama
|
container_name: ollama
|
||||||
environment:
|
environment:
|
||||||
- OLLAMA_KEEP_ALIVE=24h
|
- OLLAMA_KEEP_ALIVE=24h
|
||||||
- OLLAMA_HOST=0.0.0.0
|
- OLLAMA_HOST=0.0.0.0
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
ollama:
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
curl http://ollama:11434/api/pull -d '{"model": "llama3.2:1b"}'
|
curl http://ollama:11434/api/pull -d '{"model": "llama3.2:1b"}'
|
||||||
|
|
||||||
flask --app senju/main run --debug --host=0.0.0.0
|
cd /app
|
||||||
|
poetry run sh -c 'flask --app senju/main run --host=0.0.0.0'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue