Some checks failed
Build and publish / build (push) Failing after 19s
Source moved verbatim from mp/nginx/ on 2026-04-29; mp was the first concrete adapter consuming the libreshop toolkit. Builds and publishes git.librete.ch/libreshop/nginx on every main / v* push via the standard .gitea/workflows/build.yml shared across libreshop components.
21 lines
407 B
Bash
21 lines
407 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
echo "Generated nginx.conf:"
|
|
echo ""
|
|
cat /etc/nginx/nginx.conf
|
|
|
|
mkdir -p /cache/shop
|
|
mkdir -p /cache/uploads
|
|
mkdir -p /cache/api
|
|
|
|
echo "Starting nginx"
|
|
echo "NGINX_DEBUG=${NGINX_DEBUG}"
|
|
# Start Nginx
|
|
if [ "$NGINX_DEBUG" = "true" ]; then
|
|
sed -i 's/error\.log warn/error.log debug/' /etc/nginx/nginx.conf
|
|
exec nginx-debug -g 'daemon off;'
|
|
else
|
|
exec nginx -g 'daemon off;'
|
|
fi
|