Migrating from Exabytes to Google Cloud Run Malaysia
An architecture guide on migrating legacy WordPress or Next.js sites from Exabytes to highly scalable, containerized Google Cloud Run in asia-southeast1.
Escaping the Shared Hosting Trap
Exabytes serves a purpose for entry-level sites, but as your Malaysian business scales, legacy shared hosting architectures (cPanel, Apache, localized MySQL) become a severe bottleneck. Uptime drops, deployments are manual via FTP, and scaling requires buying a bigger VPS rather than elastic auto-scaling.
The modern solution is containerization via Docker and deployment to Serverless platforms like Google Cloud Run, specifically utilizing the asia-southeast1 (Singapore) region for ultra-low latency to Malaysia.
1. Containerizing the Application
Whether you run a Node.js (Next.js) app or a headless WordPress setup, the first step is wrapping it in a Dockerfile.
For a Next.js application, use a multi-stage build to keep the image lightweight:
# Build Stage
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production Stage
FROM node:18-alpine AS runner
WORKDIR /app
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
EXPOSE 8080
ENV PORT=8080
CMD ["node", "server.js"]
2. Deploying to Cloud Run
Once containerized, push the image to Google Artifact Registry and deploy to Cloud Run.
# Build and submit the image
gcloud builds submit --tag asia-southeast1-docker.pkg.dev/PROJECT_ID/repo/app-name
# Deploy to Cloud Run
gcloud run deploy app-name \
--image asia-southeast1-docker.pkg.dev/PROJECT_ID/repo/app-name \
--region asia-southeast1 \
--allow-unauthenticated \
--port 8080 \
--max-instances 10 \
--cpu-boost
Cloud Run will automatically scale from 0 to 10 instances based on traffic, meaning you only pay for exact compute milliseconds used.
3. Decoupling the Database
Cloud Run is stateless. You must migrate your local Exabytes MySQL database to Google Cloud SQL (PostgreSQL or MySQL). Connect Cloud Run to Cloud SQL securely using the Cloud SQL Auth Proxy via Unix sockets, avoiding public IP exposure.
Ready for enterprise-grade infrastructure? We architected the serverless infrastructure for Trexon Energy and TechFix Malaysia on GCP, resulting in 99.99% uptime and zero maintenance headaches.
Let JagaWeb map out your cloud migration with our RM5,000 Ownership & Access Review, or let our engineers manage your Cloud Run environments natively via our RM450/month Care Plan.
Ready to verify who owns your website?
Replace uncertainty with a decision-ready ownership and access report. The fixed Ownership & Access Review is RM1,500 before SST and includes a 30-day action plan.