If you have any deployment questions, or you need to upload your SSH keypair to the instance, please contact zg2921@nyu.edu.
This document explains how to deploy the full CoinCome platform:
- Backend (Spring Boot + MyBatis-Plus)
- Frontend (Vue 3 + Vite + Nginx)
- Database (OCI MySQL DB System)
- Python scripts (via Java subprocess)
- Local development workflow
The relational database is hosted on Oracle Cloud MySQL DB System.
- Subnet:
10.0.1.0/24 - DB private IP:
10.0.1.116 - DB type: OCI MySQL 9.5
- DB name:
bitcome - Port:
3306(only accessible inside subnet)
No public IP is assigned. The Spring Boot backend connects through environment variables:
DB_HOST DB_PORT DB_NAME
DB_USERNAME DB_PASSWORD
JDBC URL example:
jdbc:mysql://10.0.1.116:3306/bitcome
To access remotely (e.g., DataGrip), use SSH tunnel.
Both backend and frontend are hosted on the same OCI compute instance:
- Private IP:
10.0.1.97 - Public IP:
150.136.242.115 - OS: Ubuntu 64-bit
- Java 17 (OpenJDK)
- Spring Boot JAR (
coincome.jar) - MyBatis-Plus
- Python3 + pandas + requests
- Systemd service (
coincome.service)
- Vue 3 + Vite
- Built static files served by Nginx from
/var/www/coincome - Nginx reverse proxy → Spring Boot (localhost:8080)
git clone https://github.com/Agouiscoding/CoinCome.gitcd CoinCome/coincome
mvn clean package -DskipTestsEdit .env:
VITE_API_URL=https://150-136-242-115.sslip.io/api
VITE_GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.com
VITE_GOOGLE_REDIRECT_URI=https://150-136-242-115.sslip.io/auth/google/callbackBuild:
npm install
npm run buildInstall dependencies:
sudo apt update && sudo apt upgrade -y
sudo apt install -y openjdk-17-jre-headless python3 python3-pip nginx-core
pip3 install --no-cache-dir pandas requestsSetup swap (recommended for 1 GB RAM):
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabDirectory structure:
/opt/coincome/app/coincome.jar
/opt/coincome/uploads
/opt/coincome/python
/opt/coincome/tmp
/opt/coincome/logs
/var/www/coincome ← frontend
Create them:
sudo mkdir -p /opt/coincome/{app,uploads,python,tmp,logs}
sudo mkdir -p /var/www/coincome
sudo chown -R ubuntu:ubuntu /opt/coincome /var/www/coincomeCreate:
/etc/coincome/coincome.env
Content:
SPRING_PROFILES_ACTIVE=prod
DB_HOST=10.0.1.116
DB_PORT=3306
DB_NAME=bitcome
DB_USERNAME=agou
DB_PASSWORD=<db-password>
FILE_UPLOAD_BASE_DIR=/opt/coincome/uploads
PYTHON_EXEC=/usr/bin/python3
PYTHON_SCRIPT_DIR=/opt/coincome/python
PYTHON_TMP_DIR=/opt/coincome/tmp
GOOGLE_CLIENT_ID=xxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=<google-client-secret>
APP_BASE_URL=https://150-136-242-115.sslip.io
OAUTH_REDIRECT_URI=https://150-136-242-115.sslip.io/api/auth/google/callbackBackend remote config (application_remote.yml) already supports ${VAR}.
Upload JAR:
scp target/coincome-0.0.1-SNAPSHOT.jar \
ubuntu@150.136.242.115:/opt/coincome/app/coincome.jarCreate systemd service:
/etc/systemd/system/coincome.service
[Unit]
Description=CoinCome Spring Boot Service
After=network.target
[Service]
User=ubuntu
WorkingDirectory=/opt/coincome/app
EnvironmentFile=/etc/coincome/coincome.env
ExecStart=/usr/bin/java -jar /opt/coincome/app/coincome.jar
Restart=always
RestartSec=5
SuccessExitStatus=143
StandardOutput=append:/opt/coincome/logs/coincome.out.log
StandardError=append:/opt/coincome/logs/coincome.err.log
[Install]
WantedBy=multi-user.targetStart:
sudo systemctl daemon-reload
sudo systemctl enable coincome
sudo systemctl start coincome
sudo systemctl status coincomeUpload frontend:
scp -r dist/* ubuntu@150.136.242.115:/var/www/coincome/Nginx config:
/etc/nginx/sites-available/coincome
server {
listen 80 default_server;
server_name 150-136-242-115.sslip.io _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name 150-136-242-115.sslip.io _;
root /var/www/coincome;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}Enable config:
sudo ln -s /etc/nginx/sites-available/coincome /etc/nginx/sites-enabled/coincome
sudo nginx -t
sudo systemctl reload nginxsudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx \
-d 150-136-242-115.sslip.io \
--redirect --agree-tos -m you@example.comYour site is now live at:
👉 https://150-136-242-115.sslip.io
ssh -i <your-private-key> \
-L 3307:10.0.1.116:3306 \
ubuntu@150.136.242.115Use localhost:3307 in local backend.
Check application.yml:
spring:
datasource:
url: jdbc:mysql://localhost:3307/bitcome?useSSL=false&allowLoadLocalInfile=true
username: agou
password: your-passwordRun:
mvn build
mvn spring-boot:runEnvironment variables needed:
GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=xxx
Ensure python3 is installed:
python3 --version
pip3 install pandas requests.env:
VITE_API_URL=http://localhost:8080
VITE_GOOGLE_CLIENT_ID=xxx.apps.googleusercontent.com
VITE_GOOGLE_REDIRECT_URI=http://localhost:5173/auth/google/callbackRun:
npm install
npm run devFrontend: http://localhost:5173
- Connect SSH tunnel (exposes DB at
localhost:3307) - Start backend on port 8080
- Start frontend on port 5173
- Add a folder
upload/underCoinCome/coincome