Spaces:
Sleeping
Sleeping
Deployment Options for Dockerized Quran App Suite
To deploy your Dockerized frontend and backend, you will generally follow a two-step workflow:
- Build and push your Docker images to a Container Registry (e.g., Docker Hub or GitHub Container Registry).
- Deploy and run those images on a cloud provider.
π οΈ Step 1: Push Images to a Container Registry
You need to host your Docker images online so your deployment server can download them.
1. Log in to Docker Hub
If you don't have an account, sign up at hub.docker.com.
docker login
2. Tag and Push your Images
Tag your local images with your Docker Hub username:
# Tag and Push Backend
docker tag quran-app-backend:latest yourusername/quran-app-backend:1.0.0
docker push yourusername/quran-app-backend:1.0.0
# Tag and Push Frontend
docker tag quran-app-frontend:latest yourusername/quran-app-frontend:1.0.0
docker push yourusername/quran-app-frontend:1.0.0
βοΈ Step 2: Choose a Deployment Platform
Here are the three best paths depending on your budget, traffic expectations, and management preferences:
| Platform | Difficulty | Estimated Cost | Pros | Cons |
|---|---|---|---|---|
| VPS (DigitalOcean / Hetzner / AWS EC2) | ββ Medium | $4 - $6 / mo | Runs your exact docker-compose.yml file; full control; cheapest for 24/7 running apps. |
You have to manage server updates, firewall, and basic security yourself. |
| PaaS (Railway.app / Render) | β Easy | $5 - $10 / mo | Direct GitHub integration; automatic builds; SSL provided out of the box; no server setup. | Slightly more expensive than a raw VPS for resources. |
| Serverless (Google Cloud Run / AWS ECS) | βββ Harder | $0 - $5 / mo | Highly scalable; scales down to 0 when idle (very cheap for low-traffic dev projects). | Harder to configure network settings, domains, and environment variables. |
π Recommended Deployment Methods
Option A: The Virtual Private Server (VPS) β Most Popular & Flexible
If you want to keep running things exactly the same way you do locally using your docker-compose.yml file.
- Rent a cheap Linux VM (e.g., DigitalOcean Droplet or Hetzner Cloud with 2GB RAM / 1 vCPU, approx. $5/month).
- Install Docker and Docker Compose on the VM:
sudo apt update && sudo apt install -y docker.io docker-compose-v2 - Copy your
.envanddocker-compose.ymlfiles to the server (usingscpor git clone). - Run
docker compose up -don the server! - Point your domain name to the VPS IP address.
Option B: Railway / Render β Easiest & Fastest
If you want automatic deployments directly from your GitHub repository (CI/CD) without managing virtual servers.
Railway.app:
- Create a Railway account and link your GitHub repository.
- Click New Project β Deploy from GitHub repo.
- Railway will detect the
Dockerfileinsidequran-app-backendandF_Proand deploy them automatically. - Paste your
.envvariables into the Railway dashboard under Variables. - Railway will generate public URLs (e.g.,
https://backend-production.up.railway.app) which you can map to your custom domain.
Render.com:
- Add a
render.yamlblueprint or define a Web Service for each container. - Render will automatically build the images from your Git repository and deploy them.
- Add a