docker: improve image layout and backend-only/frontend-only images (#2071)

* docker: improve image layout and backend-only image

* add tests

* add tests

* add frontend

* add frontend

* label

* fix
This commit is contained in:
Nicolò Boschi 2024-06-05 13:46:14 +02:00 • committed by GitHub
commit ba59a9f449
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 233 additions and 48 deletions

View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e
trap 'kill -TERM $PID' TERM INT
if [ -z "$BACKEND_URL" ]; then
BACKEND_URL="$1"
fi
if [ -z "$BACKEND_URL" ]; then
echo "BACKEND_URL must be set as an environment variable or as first parameter. (e.g. http://localhost:7860)"
exit 1
fi
sed -i "s|__BACKEND_URL__|$BACKEND_URL|g" /etc/nginx/conf.d/default.conf
cat /etc/nginx/conf.d/default.conf
# Start nginx
exec nginx -g 'daemon off;'