# Deployment Infrastructure

Date: 2018-10-18

# Scope

Tools we use for deploying these apps

# Context

We need infrastructure and services to deploy every app contained in this repo as both STAGING and PRODUCTION automatically by a CI service.

# Decision

Our CI will run tests and build every app. Frontend apps will be deployed to NETLIFY by using its CLI. Netlify is very simple, powerful and free.

~For the backend we use Zeit Now via its CLI. It provides load balancer and auto scaling out of the box for a ver low price. Since we will have many apps (+ Prisma servers) of different sizes, it makes sense to use this solution as it can be scaled only when it needs. Our backend apps are deployed as Docker containers in Zeit Now.~ Since Now v1 was deprecated, we have stared using https://render.com.

During the deployment of the backend, production secrets are fetched and Prisma schema is deployed. Noticed that it does not "force" the deployment in order to prevent undesired changes. Whenever a big change needs to be performed in the DB, this should be deployed manually using Prisma CLI. Apollo engine data is also deployed during this process.

Apart form that, we have 2 services in Google Cloud Platform. One of them, WRJ Staging, is used for all development and staging processes. WRJ Fulfillment is used for Fulfillment service and relay apps in production.

Last updated: 4/30/2020, 1:19:14 PM