Intercode SaaS Kit
  • Welcome to SaaS Starter Kit
  • Getting Started
    • Technology stack
    • Database Setup
    • Local Environment Setup
  • Basics
    • Dependencies
    • App architecture
    • Deployment
    • App roles
    • Endpoints List
      • Auth
      • Two Factor Auth
      • Businesses
      • Demo
      • Email
      • Export Document
      • Email Files
      • Files Demo
      • Leads
      • Orders
      • Payments
      • Subscriptions
      • Teams
      • Team Memberships
      • User Admin
  • Animation and Styles
    • Framer Motion
    • Ant Design and Styles
  • Pages
    • Auth
      • Working with PassportJS
      • Two-Factor Auth
      • OAuth Providers
    • Leads
    • Businesses
    • Team management
      • Ownership
    • Profile
    • User Settings
      • App Tour
    • App Settings
      • Lead Statuses
    • Dashboard
      • Lead volume widget
      • Doughnut chart widget
      • Recent leads table widget
      • Lead count over period widget
    • Demo
  • Features
    • Impersonation
    • Subscriptions (Stripe)
    • Search
    • Sentry
    • Captcha
    • Audit Logs
    • Internationalization
  • External integrations
    • Mailer
    • Google oAuth2
    • Facebook oAuth2
    • S3 compatible storage (AWS, MinIO)
Powered by GitBook
On this page
  1. Basics

Deployment

GitHub Actions

This project includes two GitHub Actions workflows, located in .github/workflows/api.yml and .github/workflows/ui.yml, each responsible for building, pushing, and deploying Docker images for the API and UI components. In both files we have only 2 jobs: build and deployment.


API Workflow (api.yml)

  • Workflow Name: [App] Your Name

  • Triggers: Executes on any push to the develop branch (can be production or stage, whatever you set) that includes changes in the api/ directory.

  • Environment: Staging

  • Key Steps:

    1. Checkout: Clones the repository.

    2. Docker Hub Login: Logs into Docker Hub using stored credentials.

    3. Docker Setup: Sets up Docker Buildx for multi-platform builds.

    4. Build and Push: Builds and pushes the Docker image using Dockerfile_api with the tag staging.

    5. Deployment: Triggers a POST request to initiate the deployment of the newly built image on the staging server.


UI Workflow (ui.yml)

  • Workflow Name: [App] Intercode Common UI Staging

  • Triggers: Executes on any push to the develop branch that includes changes in the ui/ directory.

  • Environment: Staging

  • Key Steps:

    1. Checkout: Clones the repository.

    2. Docker Hub Login: Logs into Docker Hub using stored credentials.

    3. Docker Setup: Sets up Docker Buildx for multi-platform builds.

    4. Build and Push: Builds and pushes the Docker image using Dockerfile_ui with the tag staging and necessary environment variables for the UI.

    5. Deployment: Triggers a POST request to initiate the deployment of the newly built image on the staging server.

Each workflow is designed for efficient staging deployment, with automated Docker image building and pushing, and deployment triggered through HTTP requests to a configured endpoint.

For correct work you should set necessary secrets and variables in your repository settings. In settings tab find Security module click on Secrets and variables and choose actions. To secrets add next variables with your values:

  • DOCKER_HUB_ACCESS_TOKEN

  • DOCKER_HUB_USERNAME

Then on tab "Variables" add next variables with your values:

  • DEPLOYMENT_HOST

  • DEPLOYMENT_PASSWORD

  • DEPLOYMENT_USERNAME

You can create Docker Hub account and necessary variables following next official guide:

To run deployment type next command in your production server terminal:

curl https://gist.github.com/YOUR-REPOSITORY-NAME/install.sh 
--ui-subdomain YOUR-DOMAIN --api-subdomain YOUR-DOMAIN

PreviousApp architectureNextApp roles

Last updated 6 months ago

Docker Hub QuickstartDocker Documentation
Logo