- Oracle Cloud Infrastructure account
- Oracle Linux VM instance
- SSH key for VM access
- Docker and Docker Compose installed locally (for building)
- Java 17 (for building JAR files)
Copy the .env.template file to create a .env file:
cp .env.template .envEdit the .env file with your personal credentials:
# Oracle Cloud Registry Configuration
OCI_REGISTRY_URL=your-registry-url
OCI_USERNAME=your-username-with-tenancy
# VM Configuration
VM_IP=your-vm-ip
VM_USER=your-vm-username
SSH_KEY_PATH=path-to-your-ssh-keyNote: The .env file is excluded from git via .gitignore to prevent committing sensitive information.
# On Windows
load_env.bat
# On Linux/Mac
source load_env.shThis approach builds the Docker images directly on the Oracle VM, bypassing the Oracle Container Registry:
# 1. Build the application with Maven
mvn clean package -DskipTests
# 2. Prepare the deployment package
prepare_vm_package.bat # Windows
./prepare_vm_package.sh # Linux/Mac
# 3. Transfer files to your VM (automatically uses your .env variables)
scp -i %SSH_KEY_PATH% -r vm-deploy %VM_USER%@%VM_IP%:~/music-analytics
# 4. SSH into your VM and run the deploy script
ssh -i %SSH_KEY_PATH% %VM_USER%@%VM_IP%
cd ~/music-analytics
chmod +x deploy.sh
./deploy.shIf you prefer to use Oracle Container Registry:
# Windows
deploy_oracle_cloud.bat
# Linux/Mac
./deploy_oracle_cloud.shFollow the instructions on-screen to complete the deployment.
-
Auth Tokens: When prompted for password during Docker login, use the Auth Token from Oracle Cloud, not your regular password.
-
VM Firewall: Ensure your Oracle VM has the necessary ports open (8080, 8762, etc.).
-
Sensitive Data: Never commit
.envfiles or SSH keys to your repository. -
Regular Updates: Update your Auth Tokens periodically for better security.
After successful deployment, your services will be available at:
- API Gateway: http://[YOUR_VM_IP]:8080
- Eureka Server: http://[YOUR_VM_IP]:8762
- Service Endpoints through the API Gateway: http://[YOUR_VM_IP]:8080/api/*