BYTEBOOK
Fresh Ubuntu 24.04 LTS Deployment. Root Access.
[00:00:00] SYSTEM_READY
_
DEMOS Main Archive JAVA LABS Enterprise PY LABS Neural Assets NODE LABS Async Runtime INFRA Blueprints
PATH: ROOT / UBUNTU_SERVER / FULL_STACK_PROVISIONING
SUB_DOMAINS
SETUP_DEMO
SPRING_SECURITY
CLOUD_NATIVE
MICRO_SERVICES
INFRA_STEPS
  • SSH_ROOT_LOG
  • SYSTEM_UPGRADE
  • DOCKER_POSTGRES
  • JAVA_23_JDK
  • NODE_ANGULAR
INFO_PANEL
> MODE: Development
> STACK: Java23 / Spring6 / K8s
Deployment Guide: Concise steps to provision Postgres, Java 23 and Angular on a bare Ubuntu instance.
01. System & Docker Install Login as root, update OS, and install Docker Engine:
ssh root@vps_ip
apt update && apt upgrade -y
curl -fsSL get.docker.com | sh
02. Database (Postgres 16) Setup workspace and launch the DB container:
mkdir -p /app/stack && cd /app/stack
nano docker-compose.yml
docker compose up -d
03. Java 23 (JDK) Install the latest Oracle OpenJDK 23:
wget https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.deb
dpkg -i jdk-23_linux-x64_bin.deb
04. Node.js & Angular CLI Install Node 20.x and Angular global tooling:
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs
npm install -g @angular/cli
MODULE_OVERVIEW
### BYTEBOOK BACKEND DEPLOYMENT LOGS 1. WORKSPACE INITIALIZATION - Created project directory: `mkdir -p /app/bytebook-backend && cd /app/bytebook-backend` - Verified Postgres connectivity: `docker exec -it bytebook-db psql -U postgres -c "\l"` - Installed build tool: `apt install maven -y` 2. MANUAL PROJECT SETUP - Created `pom.xml` with Spring Boot 3.4.1 and Java 23 dependencies. - Configured `src/main/resources/application.properties`: `spring.datasource.url=jdbc:postgresql://localhost:5432/bytebook` `spring.datasource.username=*******` `spring.datasource.password=*******` 3. CONTROLLER IMPLEMENTATION - Created `HelloController.java` to handle API requests. - Defined endpoint: `GET /api/status` - Response: `{"status": "BYTEBOOK_SYSTEM_ONLINE", "version": "1.0"}` 4. SERVER OPERATIONS - **START:** Run `mvn spring-boot:run` in the project root. - **STOP:** Use `CTRL + C` to kill the active process. - **RESTART:** Stop the process with `CTRL + C` and run `mvn spring-boot:run` again. 5. LIVE VERIFICATION - API Link: http://63.250.40.142:8080/api/status - Verified system online status via external request. ************************ RUN IN IDE 1. VS CODE REMOTE-SSH (TERMINAL LAUNCH) - **Action:** Use the VS Code CLI to establish a persistent SSH connection to the VPS. - **Command:** `code --remote ssh-remote+root@63.250.40.142 /app/bytebook-backend` - **Result:** Opens the remote directory as if it were local, allowing live editing and terminal access within VS Code. 2. PGADMIN 4: MANUAL SSH TUNNELING - **Problem:** PostgreSQL is isolated inside Docker on the VPS (Port 5432). - **CLI Solution:** Create a secure tunnel from your local machine to the VPS: `ssh -L 5433:localhost:5432 root@63.250.40.142 -N` - **pgAdmin Setup:** In your local pgAdmin, connect to `Host: localhost" and "Port: 5433`. The traffic will be securely forwarded to the remote database. 3. SPRING BOOT OPERATIONS (VIA VS CODE TERMINAL) - **Build:** `mvn clean install` - **Run:** `mvn spring-boot:run` - **Port Mapping:** The application listens on port 8080. Access via: http://63.250.40.142:8080/api/status. 4. DOCKER DATABASE MANAGEMENT - **Verify Container:** `docker ps` - **Inspect Logs:** `docker logs bytebook-db` - **Manual SQL:** Access CLI via `docker exec -it bytebook-db psql -U postgres`. 5. SYSTEM SYNC VERIFICATION - **Local Tooling:** VS Code (Editor) + pgAdmin (GUI via 5433 tunnel). - **Remote Runtime:** Java 23 / Spring Boot 3.4 / Docker Engine.
SOURCE_CODE_PREVIEW
HelloController.java
@RestController
public class HelloController {
    
    @GetMapping("/api/status")
    public String getStatus() {
        return "{\"status\": \"BYTEBOOK_SYSTEM_ONLINE\", \"version\": \"1.0\"}";
    }
}
_