isomerpages / isomercms-backend

A static website builder and host for the Singapore Government
5 stars 1 forks source link

fix(start-commands): update commands to be different by env #1159

Closed seaerchin closed 8 months ago

seaerchin commented 8 months ago

Problem

right now, we run the same command for start across all our environments. this PR adds a different start command by environment

Solution

  1. utilise the fact that CMD is ran as the entrypoint at run-time. this means that env vars will be available
  2. create different commands for start by environment and use the env-var to differentiate
  3. due to variable expansion, the command will be transformed from start:ecs:$ENV_TYPE into start:ecs:dev/prod/staging.

NOTE: UNTESTED PR, TEST ON STAGING PRIOR TO MERGE