Spaces:
Configuration error
Configuration error
Commit History
-
Remove Fly deploy GitHub Actions workflow
Bimo Abdul AzizDelete .github/workflows/fly-deploy.yml which previously ran flyctl deploy on pushes to main. Removes the automatic Fly.io deployment workflow that used the FLY_API_TOKEN secret.6fe6cc6 -
Add fly.toml for Fly app deployment
Bimo Abdul AzizAdd Fly configuration for the tebudi-backend app. Sets primary_region to sin and SPRING_PROFILES_ACTIVE to prod. Configures http_service to use internal_port 8080, force HTTPS, keep at least 1 machine running, auto-start machines, and use an app process. Adds an HTTP health check against /actuator/health with a 90s grace period to accommodate Spring Boot startup. Allocates VM resources (1 CPU, 1GB memory).420f439 -
Simplify README and update Fly service scaling
Bimo Abdul AzizReplace README content with a minimal placeholder and adjust Fly deployment settings: set http_service.auto_stop_machines from 'stop' to 'off' and change min_machines_running from 0 to 1 to ensure at least one machine stays running. Other http_service values (internal_port=8080, force_https=true, auto_start_machines=true, processes=['app']) remain unchanged.2dcfae9
-
Migrate authentication from sessions to JWT
Bimo Abdul AzizReplace session-based auth with stateless JWT: add JwtUtil and JwtAuthFilter, configure SecurityConfig to use the JWT filter and STATELESS sessions, and remove/disable the old SessionAuthFilter. Controllers (AuthController, BookController, ReadingProgressController, SubscriptionController, UserSubscriptionController) now accept Authentication and extract userId from the JWT; AuthController.login generates a JWT and sets it on UserResponseDTO. Add jjwt dependencies to pom.xml and JWT configuration to application.properties and fly.toml (JWT_SECRET env). Also: add token field to UserResponseDTO, remove session/logout APIs and implementations, minor code cleanups (suppressWarnings on BookServiceImpl, formatting tweaks).efd17cd -
Configure CORS, cookies, and runtime profiles
Bimo Abdul AzizUse origin patterns and expose cookie headers for cross-origin requests, and add environment/profile-specific cookie settings. SecurityConfig: switch to allowedOriginPatterns to support wildcard Vercel subdomains, allow the Cookie header and expose Set-Cookie, and keep credentials enabled. Added application-dev.properties and application-prod.properties to configure SameSite/secure/http-only and session timeouts for local (HTTP) and production (HTTPS) environments. fly.toml: set SPRING_PROFILES_ACTIVE=prod for the Fly.io runtime. application.properties: default to dev profile so production is controlled by the environment variable.9b13d12 -
Eager-load Book.category and add transactions
Bimo Abdul AzizAdd repository queries that JOIN FETCH Book.category to eagerly load category in a single query and avoid lazy-loading issues (findAllWithCategory, findByIdWithCategory, and *WithCategory search methods). Keep original finder signatures for compatibility. Update BookServiceImpl to use the new repository methods and apply @Transactional annotations (readOnly for read operations, transactional for save/update) so entity associations are available within the persistence context and write operations are properly transactional.e70a676 -
Add wildcard Vercel origin to CORS
Bimo Abdul AzizAllow Vercel preview deployments by adding "https://tebudi-*.vercel.app" to the CORS allowed origins and remove the trailing-slash comment. This enables branch/preview subdomains (e.g., tebudi-branch.vercel.app). Note: pattern matching for origins depends on Spring version—if patterns are required, consider using setAllowedOriginPatterns instead of setAllowedOrigins.6c14d1a -
Remove @CrossOrigin from AuthController
Bimo Abdul AzizDelete the CrossOrigin import and the @CrossOrigin(origins = "http://localhost:5173", allowCredentials = "true") annotation from AuthController. This removes the per-controller hardcoded CORS setting (likely to be handled via a centralized/global CORS configuration instead).dd6d0db -
Add localhost CORS and fix production origin
Bimo Abdul AzizAdd http://localhost:5173 to allowed CORS origins for local development and remove the trailing slash from https://tebudi.vercel.app so the origin matches exactly. This prevents CORS mismatches between dev and production environments.889563a -
Update CORS allowed origin to tebudi.vercel.app
Bimo Abdul AzizReplace placeholder Vercel domain with the real production domain in SecurityConfig.allowedOrigins. This change allows the frontend hosted at https://tebudi.vercel.app to access the backend (localhost:5173 remains allowed for local development).b5fcd3f -
Add Vercel CORS origin and disable Open-In-View
Bimo Abdul AzizAllow the frontend hosted at https://nama-project-kamu.vercel.app in CORS by switching to setAllowedOrigins and including both localhost and Vercel origins. Remove unused List import. Also disable Hibernate Open Session In View (spring.jpa.open-in-view=false) to avoid lazy-loading outside transactions and promote proper transactional data access.a9f62ea -
Allow actuator health checks and config updates
Bimo Abdul AzizPoint Fly health check to /actuator/health and increase timeout; permit actuator endpoints in Spring Security so external health probes won't be redirected to login. Also change JPA ddl-auto from 'none' to 'update', expose management health endpoint, disable management security, and add dummy spring.security.user credentials. These changes ensure the platform health check succeeds during Spring Boot startup and enable runtime schema updates/configuration for the deployment environment.0910f23 -
Set server.address to 0.0.0.0
Bimo Abdul AzizExpose the Spring Boot server on all network interfaces by adding server.address=0.0.0.0 to application.properties. This allows the app to accept external connections (useful for containerized or remote deployments) while keeping the existing port configuration.4af2b52 -
Add Fly deployment config and Docker setup
Bimo Abdul AzizPrepare project for Fly.io deployment: add .dockerignore and fly.toml, plus a GitHub Actions workflow to deploy on pushes to main. Update Dockerfile to a Maven build stage and lightweight Java 21 runtime, set memory-optimizing JAVA_OPTS, and switch exposed port to 8080. Adjust application.properties to use server.port=8080. fly.toml includes internal_port, health check, region and VM resource settings.bc63b7c -
Fix: Set ddl-auto to none and enforce database cloud SSL parameters
Bimo Abdul Aziz33fbdd7 -
adalah pokoknya
Bimo Abdul Aziz2471b7b -
Fix: Downgrade Docker build image to Java 21 LTS to match Docker Hub registry
Bimo Abdul Azizf17c9b3 -
Fix: Add mandatory Hugging Face metadata configuration to README
Bimo Abdul Azize533fdc -
Update Dockerfile
Bimo Abdul Azizdd92bb8 -
Add multi-stage Dockerfile for Java app
Bimo Abdul AzizIntroduce a multi-stage Dockerfile: stage 1 uses maven:3.9.9-eclipse-temurin-25 to build the project (mvn clean package -DskipTests); stage 2 uses eclipse-temurin:25-jre-alpine as a lightweight runtime. The built target/*.jar is copied to app.jar, port 8080 is exposed (Render default), and the container runs with ENTRYPOINT ["java","-jar","app.jar"]. This separates build and runtime to produce a smaller runtime image.1fd4096 -
Initial commit: TeBuDi Spring Boot app
Bimo Abdul AzizAdd initial TeBuDi digital book subscription Spring Boot project. Includes pom.xml, Maven wrapper, .gitignore and application.properties. Adds application entry point and core configuration (Cloudinary, Security, WebMvc) plus SessionAuthFilter and global exception handler. Implements controllers (Auth, Book, Category, ReadingProgress, Subscription, User and related), DTOs, models, repositories, services and service implementations to support user auth, book management, file serving (proxying PDFs from Cloudinary), categories, subscriptions and reading progress. Basic CORS, session-based auth, password encoding, and static resource mapping for data-storage are configured.73c2e44