Skip to content

platfone-com/temp-number-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Temp Number Deployment

Deployment automation and configuration for the Temp Number application stack.

Stack: AdonisJS Backend β€’ Vue.js Frontend β€’ MySQL Database


πŸš€ Quick Start

New to this project? Run the interactive setup wizard:

./setup-wizard.sh

This guided wizard will:

  • βœ… Help you choose between local Docker or Google Cloud deployment
  • βœ… Set up Firebase authentication (required)
  • βœ… Configure GCP project (if deploying to cloud)
  • βœ… Clone source code repositories (if needed)
  • βœ… Create and validate configuration files
  • βœ… Deploy your application automatically

Perfect for first-time setup! The wizard handles all the complexity for you.

πŸ§™ Setup Wizard Guide - First-time setup walkthrough

Note for Windows users: All bash scripts work seamlessly in WSL (Windows Subsystem for Linux). See the Windows WSL Setup Guide for detailed instructions.


πŸ“‹ Manual Deployment Options

Already configured? Use these direct deployment methods:

Option 1: Local Development (Docker Compose)

Run the entire stack locally for development and testing.

# Start all services (from project root)
./docker-start.sh

Access:

πŸ“– Full guide: Docker Compose Local Testing


Option 2: Google Cloud Run (Production)

Deploy to Google Cloud Platform with automated setup.

# Interactive deployment (from project root)
./google-cloud-deploy.sh

The script handles:

  • CloudSQL database setup
  • Backend API deployment
  • Web frontend deployment
  • Database migrations
  • Secret management

πŸ“– Full guide: Complete Deployment Guide
πŸ“‹ Quick reference: Common Commands


πŸ”§ What You Need (Manual Setup)

If you prefer manual configuration over the setup wizard, you'll need:

1. Prerequisites

For Local Docker:

  • Docker and Docker Compose installed

For Google Cloud:

  • gcloud CLI (Google Cloud SDK) installed and authenticated
  • GCP project with billing enabled

2. Configuration Files

The setup wizard creates these automatically, or you can create them manually:

# Copy templates
cp config/env/backend.env.example config/env/backend.env
cp config/env/web.env.example config/env/web.env
cp config/secrets/backend.secrets.example config/secrets/backend.secrets

# Edit with your values
nano config/env/backend.env
nano config/env/web.env
nano config/secrets/backend.secrets

What you need:

  • config/env/backend.env - Database, server settings
  • config/env/web.env - Firebase config, web settings
  • config/secrets/backend.secrets - API keys, passwords, tokens, etc.

3. Service Account Keys

Firebase Admin SDK:

  • Download from Firebase Console β†’ Project Settings β†’ Service Accounts
  • Save as: config/secrets/firebase-service-account.json

GCP Service Account (for cloud deployment only):

  • Create in GCP Console β†’ IAM & Admin β†’ Service Accounts
  • Save as: config/cloud-providers/gcp-service-account.json

πŸ“– Detailed setup guide: Configuration Guide

4. Source Code

Clone backend and web repositories to the root of this project manually:

git clone https://github.com/platfone-com/temp-number-backend.git
git clone https://github.com/platfone-com/temp-number-web.git

🎯 Recommended Workflow

First Time Setup

  1. Run ./setup-wizard.sh (easiest!)
  2. Let the wizard guide you through all steps
  3. Deploy automatically when prompted

Subsequent Deployments

  • Local: ./docker-start.sh
  • Cloud: ./google-cloud-deploy.sh

Advanced Users

Use individual scripts in scripts/gcp/ for granular control:

  • setup_gcp_project.sh - GCP project setup
  • setup_firebase_project.sh - Firebase configuration
  • create_sql_instance.sh - Database setup
  • deploy_backend.sh - Backend deployment
  • deploy_web.sh - Frontend deployment

πŸ” Security

Never commit these files:

  • ❌ config/cloud-providers/gcp-service-account.json
  • ❌ config/secrets/firebase-service-account.json
  • ❌ config/secrets/backend.secrets
  • ❌ config/env/backend.env
  • ❌ config/env/web.env

They are already in .gitignore for your protection.


πŸ“ Project Structure

temp-number-deploy/
β”œβ”€β”€ setup-wizard.sh                  # πŸ§™ Setup wizard wrapper (START HERE!)
β”œβ”€β”€ docker-start.sh                  # 🐳 Docker deployment wrapper
β”œβ”€β”€ google-cloud-deploy.sh           # ☁️ GCP deployment wrapper
β”‚
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ setup_wizard.sh              # Interactive setup wizard (actual script)
β”‚   β”œβ”€β”€ common/                      # Common helper functions
β”‚   β”‚   └── helpers.sh
β”‚   β”œβ”€β”€ docker/                      # Docker Compose files
β”‚   β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   β”‚   └── docker-start.sh          # Start all services locally (actual script)
β”‚   └── gcp/                         # GCP deployment scripts
β”‚       β”œβ”€β”€ setup_gcp_project.sh     # GCP project setup helper
β”‚       β”œβ”€β”€ setup_firebase_project.sh # Firebase setup helper
β”‚       └── deploy_app.sh            # Google Cloud deployment (actual script)
β”‚
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ env/                         # Environment configuration (git-ignored)
β”‚   β”‚   β”œβ”€β”€ backend.env              # Backend settings
β”‚   β”‚   └── web.env                  # Web frontend settings
β”‚   β”œβ”€β”€ secrets/                     # Sensitive data (git-ignored)
β”‚   β”‚   β”œβ”€β”€ backend.secrets          # API keys, passwords
β”‚   β”‚   └── firebase-service-account.json
β”‚   └── cloud-providers/             # Cloud credentials (git-ignored)
β”‚       └── gcp-service-account.json
β”‚
β”œβ”€β”€ docs/                            # Documentation
β”‚   β”œβ”€β”€ SETUP_WIZARD.md              # πŸ§™ Setup wizard guide
β”‚   β”œβ”€β”€ WINDOWS_WSL_GUIDE.md         # πŸͺŸ Windows WSL setup guide
β”‚   └── docker/
β”‚   β”‚   └── DOCKER_COMPOSE_LOCAL.md
β”‚   └── gcp/
β”‚       β”œβ”€β”€ DEPLOYMENT.md
β”‚       └── QUICK_REFERENCE.md
β”‚
β”œβ”€β”€ temp-number-backend/             # Backend project (git cloned from repo)
β”œβ”€β”€ temp-number-web/                 # Frontend project (git cloned from repo)
β”‚
β”œβ”€β”€ setup-wizard.sh                  # Wrapper script for setup wizard
β”œβ”€β”€ docker-start.sh                  # Wrapper script for Docker deployment
└── google-cloud-deploy.sh           # Wrapper script for GCP deployment

πŸ“– Documentation

Note for Windows users: All bash scripts work seamlessly in WSL (Windows Subsystem for Linux). See the Windows WSL Setup Guide for detailed instructions.


πŸ†˜ Troubleshooting

Setup wizard fails?

  • Make sure you have gcloud installed and authenticated
  • Check that Docker is running (for local deployment)
  • Verify billing is enabled on your GCP project (for cloud deployment)

Need help?

  • See Troubleshooting Guide
  • Check individual script documentation in docs/
  • Open an issue in this repository

πŸ“ License

MIT with restrictions on API usage. See LICENSE for details.


πŸ› οΈ Support

For issues or questions:

  • Getting Started: Run ./setup-wizard.sh for guided setup
  • Documentation: Check the guides in the docs/ folder
  • Bugs: Open an issue in this repository
  • Cloud Deployment: See Troubleshooting Guide

About

Deploy scripts and documentation for Temp-Number App

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages