For now the following are required:
I will do my best to work on removing these requirements in dev but I don't know if/how/when that will happen.
// Sets your environment to dev which turns off some handy things
// like the Sqreen agent. It also turns on the GraphQL playground
NODE_ENV=dev
// The username to login to postgres wth
CLOUDSQL_USER=postgres
// The password for the postgres user
CLOUDSQL_PASSWORD=allthesecurity
// For local dev this is the name of the Docker DB container (the host)
CLOUDSQL_CONNECTION_NAME=database
// Database to connect to
CLOUDSQL_DATABASE_NAME=wrabit
// Client secret used to connect with Firebase
GOOGLE_APPLICATION_CREDENTIALS=client-secret.json
// Used to interact with the Stripe platform
STRIPE_KEY=XXXXXXXXXXXXXXXXXXXX
// Used to send email through mailgun
MAILGUN_KEY=XXXXXXXXXXXXXXXXXXXX
// Used to encrypt user data
ENCRYPTION_KEY=thisencryptsuserdatainthedatabase
.env.example
to .dev.env
and fill out the fieldswrabit.sql
to have a user for testing (or manually create an account)docker-compose up
schema.graphql
go generate ./...
from the root directoryThe schema is currently managed by one SQL file (wrabit.sql
). Once the database becomes larger, we will be forced to solve the schema management problem. Until then...
Run the gcloud
SQL connect command (this will whitelist your IP for 5 minutes)
gcloud sql connect wrabit-postgres
Enter password for database (check .prod.env
file)
Switch to the wrabit
database
\c wrabit
Secrets are currently stored in a local .stage.env/.prod.env
file. In order to get them onto the CI/CD pipeline, we need to use Travis' encrypt tool.
make update-secrets