Migrate database to default locally

This commit is contained in:
Charles Bochet
2023-04-20 13:45:59 +02:00
parent ead01b4184
commit 6fa71e12b5
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ services:
restart: always restart: always
environment: environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/hasura HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/hasura
HASURA_GRAPHQL_PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/twenty HASURA_GRAPHQL_PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/default
HASURA_GRAPHQL_ENABLE_CONSOLE: "false" HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
HASURA_GRAPHQL_DEV_MODE: "true" HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
@ -38,7 +38,7 @@ services:
- "4000:4000" - "4000:4000"
environment: environment:
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key": "jwt-very-long-hard-to-guess-secret"}' HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key": "jwt-very-long-hard-to-guess-secret"}'
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/twenty HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/default
HASURA_GRAPHQL_GRAPHQL_URL: http://twenty-hasura:8080/v1/graphql HASURA_GRAPHQL_GRAPHQL_URL: http://twenty-hasura:8080/v1/graphql
HASURA_GRAPHQL_ADMIN_SECRET: secret HASURA_GRAPHQL_ADMIN_SECRET: secret
npm_package_version: '0' npm_package_version: '0'

View File

@ -1,8 +1,8 @@
CREATE DATABASE twenty; CREATE DATABASE "default";
CREATE DATABASE hasura; CREATE DATABASE hasura;
-- From: https://raw.githubusercontent.com/nhost/hasura-auth/main/docker/initdb.d/0001-create-schema.sql -- From: https://raw.githubusercontent.com/nhost/hasura-auth/main/docker/initdb.d/0001-create-schema.sql
\c twenty; \c default;
-- auth schema -- auth schema
CREATE SCHEMA IF NOT EXISTS auth; CREATE SCHEMA IF NOT EXISTS auth;
-- https://github.com/hasura/graphql-engine/issues/3657 -- https://github.com/hasura/graphql-engine/issues/3657