Skip to content

Commit

Permalink
Merge pull request #197 from novaforgood/Max/email-whitelist
Browse files Browse the repository at this point in the history
Add production docker-compose
  • Loading branch information
legitmaxwu committed May 7, 2024
2 parents 583a307 + ef11654 commit 47ea79e
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 31 deletions.
2 changes: 1 addition & 1 deletion hasura/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.env
.env*
/db_data
47 changes: 47 additions & 0 deletions hasura/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: "3.6"
services:
postgres:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgrespassword
graphql-engine:
image: hasura/graphql-engine:v2.16.0
ports:
- "8080:8080"
depends_on:
- "postgres"
restart: always
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
## uncomment next line to set an admin secret
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
## Hasura JWT Secret
HASURA_GRAPHQL_JWT_SECRET: "${HASURA_GRAPHQL_JWT_SECRET}"
## Unauthorized role
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: "public"

## CRON Webhook URL
CANOPY_CRON_WEBHOOK_URL: "${CANOPY_CRON_WEBHOOK_URL}"
## CRON Client Key
CANOPY_CRON_CLIENT_KEY: "${CANOPY_CRON_CLIENT_KEY}"

## Event Webhook URL
CANOPY_EVENT_WEBHOOK_URL: "${CANOPY_EVENT_WEBHOOK_URL}"
## Event Client Key
CANOPY_EVENT_CLIENT_KEY: "${CANOPY_EVENT_CLIENT_KEY}"
volumes:
db_data:
36 changes: 6 additions & 30 deletions hasura/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,20 @@ services:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
- canopy_prod_db:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgrespassword
env_file:
- .env.prod
graphql-engine:
image: hasura/graphql-engine:v2.16.0
ports:
- "8080:8080"
depends_on:
- "postgres"
restart: always
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
## uncomment next line to set an admin secret
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
## Hasura JWT Secret
HASURA_GRAPHQL_JWT_SECRET: "${HASURA_GRAPHQL_JWT_SECRET}"
## Unauthorized role
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: "public"
env_file:
- .env.prod

## CRON Webhook URL
CANOPY_CRON_WEBHOOK_URL: "${CANOPY_CRON_WEBHOOK_URL}"
## CRON Client Key
CANOPY_CRON_CLIENT_KEY: "${CANOPY_CRON_CLIENT_KEY}"

## Event Webhook URL
CANOPY_EVENT_WEBHOOK_URL: "${CANOPY_EVENT_WEBHOOK_URL}"
## Event Client Key
CANOPY_EVENT_CLIENT_KEY: "${CANOPY_EVENT_CLIENT_KEY}"
volumes:
db_data:
canopy_prod_db:

0 comments on commit 47ea79e

Please sign in to comment.