Add initial Docker setup with .dockerignore, Dockerfile, and entrypoint script
Some checks failed
Building and publishing Homebrewery as Docker Image / build (release) Failing after 2m10s
Some checks failed
Building and publishing Homebrewery as Docker Image / build (release) Failing after 2m10s
This commit is contained in:
35
entrypoint.sh
Normal file
35
entrypoint.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG_FILE="/usr/src/app/config/docker.json"
|
||||
|
||||
# Falls Verzeichnis noch nicht existiert
|
||||
mkdir -p /usr/src/app/config
|
||||
|
||||
# Falls docker.json noch nicht existiert
|
||||
if [ ! -f "$CONFIG_FILE" ]; then
|
||||
echo "Creating docker.json from environment..."
|
||||
|
||||
cat > "$CONFIG_FILE" <<EOF
|
||||
{
|
||||
"host": "${HB_HOST}",
|
||||
"port": ${PORT},
|
||||
"naturalCritURL": "${HB_NATURALCRIT_URL}",
|
||||
"secret": "${HB_SECRET}",
|
||||
"enableV3": ${HB_ENABLE_V3:-false},
|
||||
"enableThemes": ${HB_ENABLE_THEMES:-false},
|
||||
"localEnvironments": "${HB_LOCAL_ENVIRONMENTS}",
|
||||
"publicUrl": "${HB_PUBLIC_URL}",
|
||||
"images": ${HB_IMAGES:-null},
|
||||
"fonts": ${HB_FONTS:-null}
|
||||
}
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "docker.json already exists, skipping creation."
|
||||
fi
|
||||
|
||||
# Start Homebrewery
|
||||
echo "Starting Homebrewery..."
|
||||
exec /tini -s -g -- node --experimental-require-module "$@" server.js
|
||||
Reference in New Issue
Block a user