digibuild-gtt-backend v1.0.0
DigiBuild GTT Backend Services
Postgres DB
A Postgres database is required. The included docker-compose.yml file can be used to start one, if desired:
docker-compose upThe database must be bootstrapped with the GTT schema. See db/README.md for instructions on this manually.
The server will attempt to sync the schema automatically, so unless this fails (server will hard exit) no manual steps are required.
Node.js service
Once the database is bootstrapped, we can run the server against it. The server uses Postgraphile to automatically generate a GraphQL schema against the GTT schema in Postgres.
npm install to build.
DATABASE_URL=postgres://postgres:postgres@localhost:5432/digi npm start to start. You can also set the DATABASE_url
variable externally or set it in src/.env.
See postgres.env if you are using the docker-compose option.
GraphiQL starts up at http://localhost:3000/graphiql.
Pushing the image
One-time setup:
$ brew install docker-credential-helper-ecr
or
$ sudo amazon-linux-extras enable docker
$ sudo yum install amazon-ecr-credential-helperThen: https://github.com/awslabs/amazon-ecr-credential-helper#Configuration
Thereafter, to push a build run
TAG=<a tag> make pushTAG can be a timestamp such as 0429-0957 (4/29 9:57 AM) or just latest.
Deploying to AWS
5 years ago