- Create an ECR repository to house your OpenResty image. Example name:
sat-api-pg-dev/openresty
- Copy the
./deployment/.sample_env
to./deployment/.env
. Update accordingly with the values relevant for your project. - Create the stack of required AWS resources:
$ cd deployment $ ./createStack.sh
- Update the newly created RDS instance's security policy to allow inbound traffic from the IP address of the machine where you are executing the deployment. This will allow the deployment package to run
psql
commands from your IP address. - Build the deployment configuration file from you environment settings. From the
/deployment
directory run:$ ./createSubZeroConfig.sh
- Deploy the database migrations and the push the latest OpenResty image to ECR run. This will create the
sat-api-pg
schemas, users, tables, views and functions in your stack's RDS database.$ ./deploy.sh
- Now that our database is ready and the updated image is in ECR, bring up an instance of your service:
$ ./createStack.sh 1 # The 1 indicates a single instance of your service
To create a new Sqitch migration run
$ yarn subzero migrations add --no-diff --note "yournote" yourmigrationname
This will create the appropriate files in the migrations
directory which you can then modify with your desired changes.