Initialize project and update portal port configuration
Set default portal port to 8081, fix Dart build issue in cart screen, and update setup documentation. Co-Authored-By: Oz <oz-agent@warp.dev>
This commit is contained in:
21
docker/entrypoint/30-generate-runtime-config.sh
Normal file
21
docker/entrypoint/30-generate-runtime-config.sh
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
TARGET="/usr/share/nginx/html/assets/assets/config/runtime_config.json"
|
||||
mkdir -p "$(dirname "$TARGET")"
|
||||
|
||||
if command -v envsubst >/dev/null 2>&1; then
|
||||
envsubst < /opt/runtime_config.template.json > "$TARGET"
|
||||
else
|
||||
cat > "$TARGET" <<JSON
|
||||
{
|
||||
"firebase_api_key": "${FIREBASE_API_KEY:-}",
|
||||
"firebase_auth_domain": "${FIREBASE_AUTH_DOMAIN:-}",
|
||||
"firebase_project_id": "${FIREBASE_PROJECT_ID:-}",
|
||||
"firebase_storage_bucket": "${FIREBASE_STORAGE_BUCKET:-}",
|
||||
"firebase_messaging_sender_id": "${FIREBASE_MESSAGING_SENDER_ID:-}",
|
||||
"firebase_app_id": "${FIREBASE_APP_ID:-}",
|
||||
"firebase_measurement_id": "${FIREBASE_MEASUREMENT_ID:-}"
|
||||
}
|
||||
JSON
|
||||
fi
|
||||
16
docker/nginx/default.conf
Normal file
16
docker/nginx/default.conf
Normal file
@ -0,0 +1,16 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user