mirror of
https://github.com/senju1337/senju.git
synced 2025-12-23 23:39:27 +00:00
feat: deploy a production level webserver with docker
Refs: OPS-15
This commit is contained in:
parent
8cd216673c
commit
2c75fa26a7
4 changed files with 3 additions and 4 deletions
|
|
@ -14,8 +14,6 @@ RUN apk add curl bash jq
|
||||||
RUN pip install poetry
|
RUN pip install poetry
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
|
|
||||||
FROM base as dev
|
|
||||||
|
|
||||||
# Expose development port
|
# Expose development port
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ services:
|
||||||
senju:
|
senju:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: dev
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5000:5000"
|
- "127.0.0.1:5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# First create a readable multiline string
|
# First create a readable multiline string
|
||||||
SYSTEM_PROMPT=$(cat <<EOF
|
SYSTEM_PROMPT=$(cat <<EOF
|
||||||
|
|
@ -65,4 +66,4 @@ CONF=$(jq -n --arg system "$SYSTEM_PROMPT" '{
|
||||||
curl http://ollama:11434/api/pull -d '{"model": "phi3"}'
|
curl http://ollama:11434/api/pull -d '{"model": "phi3"}'
|
||||||
curl http://ollama:11434/api/create -d "$CONF"
|
curl http://ollama:11434/api/create -d "$CONF"
|
||||||
cd /app
|
cd /app
|
||||||
poetry run sh -c 'flask --app senju/main run --host=0.0.0.0'
|
poetry run sh -c 'waitress-serve --listen=*:5000 senju.main:app'
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ dependencies = [
|
||||||
"requests (>=2.32.3,<3.0.0)",
|
"requests (>=2.32.3,<3.0.0)",
|
||||||
"coverage (>=7.6.12,<8.0.0)",
|
"coverage (>=7.6.12,<8.0.0)",
|
||||||
"pytest-httpserver (>=1.1.2,<2.0.0)",
|
"pytest-httpserver (>=1.1.2,<2.0.0)",
|
||||||
|
"waitress (>=3.0.2,<4.0.0)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue