init
This commit is contained in:
commit
3cbff4c68e
11 changed files with 344 additions and 0 deletions
16
scripts/build
Executable file
16
scripts/build
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
: "${DOCKER_BIN:=docker}"
|
||||
|
||||
here=$(dirname "$(realpath "$0" || echo "$0")")
|
||||
root=$(dirname "$here")
|
||||
|
||||
builddir=build
|
||||
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
|
||||
cd "$root"
|
||||
|
||||
[ -d "$builddir" ] || mkdir "$builddir"
|
||||
poetry export --output="$builddir"/requirements.txt
|
||||
$DOCKER_BIN build --tag webclip .
|
||||
12
scripts/run
Executable file
12
scripts/run
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
: "${DOCKER_BIN:=docker}"
|
||||
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
|
||||
exec $DOCKER_BIN run \
|
||||
--rm -it \
|
||||
--env UVICORN_HOST=0.0.0.0 \
|
||||
--publish 8000:8000 \
|
||||
webclip \
|
||||
"$@"
|
||||
10
scripts/server
Executable file
10
scripts/server
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
[ -z "${DEBUG:-}" ] || set -x
|
||||
|
||||
# --reload \
|
||||
# exec poetry run uvicorn \
|
||||
exec uvicorn \
|
||||
--no-server-header \
|
||||
--no-date-header \
|
||||
webclip:app
|
||||
Loading…
Add table
Add a link
Reference in a new issue