Setting up an admin server
Set up an appropriate instance. I've used a copy of the existing server running cobudget, a t2.small.
These notes are work in progress and not to be trusted!!!
Install docker
Make a dbdump
directory to contain the database dumps we want to reload
Login to the relevant docker repo
Get the cobudget docker image
Create a network, start the database and the cobudget container
(Please note this database will not store data after the container crashes. Should be fixed) (Please also note it uses user ubuntu, which is foolish. It might as well use a user cobudget
so it has the same owner as the production database)
Given the dbdump
directory has a database dump called cobudget-prod-171129
, restore this to the database
Start the cobudget container, start delayed jobs and mailcatcher
Cobudget in now running on port 3000 and mailcatcher on port 80
Installing and running kong from a container
Start the kong database and run migrations
(Please note this database will not store data after the container crashes. Should be fixed)
(Please also not this command use links, which is no longer recommended)
Start kong on the host network and make it listen on port 80
Register the cobudget api
If the kong server is restarted and the database still runs, it will have the API registered in the database.
Cobudget is now accessible through this server on /cb
(This path can be used for branch-name)
Mailcatcher
If we set up a DNS to mailcatcher.test.cobudget.co
(can be done easy by using wildcards), we can give access to mailcacther
Last updated