Migration to last.fm, removed old spotify api client. FOSRestBundle API serving data driven front end (JWT).

This commit is contained in:
boris committed 2026-02-27 16:52:57 +00:00
1 parent 391ecf1732
commit 56dea097d6
51 files changed
+1749 -844

No files matched your search

+34 -1
View File
@@ -8,6 +8,39 @@ require_app_secret() {
fi
}
ensure_jwt_keys() {
if [ ! -f bin/console ]; then
return
fi
mkdir -p config/jwt
if [ -f config/jwt/private.pem ] && [ -f config/jwt/public.pem ]; then
return
fi
if [ -z "${JWT_PASSPHRASE:-}" ]; then
JWT_PASSPHRASE="${APP_SECRET}"
fi
openssl genpkey \
-out config/jwt/private.pem \
-algorithm rsa \
-pkeyopt rsa_keygen_bits:4096 \
-aes-256-cbc \
-pass pass:"${JWT_PASSPHRASE}"
openssl pkey \
-in config/jwt/private.pem \
-passin pass:"${JWT_PASSPHRASE}" \
-pubout \
-out config/jwt/public.pem
chmod 600 config/jwt/private.pem
chmod 644 config/jwt/public.pem
chown -R www-data:www-data config/jwt
}
install_runtime() {
if [ -f vendor/autoload_runtime.php ] && [ "${FORCE_COMPOSER_INSTALL:-0}" != "1" ]; then
return
@@ -25,6 +58,7 @@ install_runtime
if [ -f bin/console ]; then
require_app_secret
ensure_jwt_keys
fi
if [ "${RUN_MIGRATIONS_ON_START:-1}" = "1" ] && [ -f bin/console ]; then
@@ -48,4 +82,3 @@ if [ -f bin/console ]; then
fi
exec "$@"
+8
View File
@@ -23,6 +23,14 @@ server {
return 200 "OK";
}
location ^/api/v1 {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}