From ecbb86867ada11f170ce49322ac7665447b10162 Mon Sep 17 00:00:00 2001 From: ManUtopiK Date: Sat, 29 Oct 2022 19:43:44 +0200 Subject: [PATCH] feat: set hasura environment --- .env.example | 70 ++++++++++++++++++++++++++++++++------ README.md | 9 +++++ composes/hasura/hasura.yml | 8 ++--- config.yaml | 9 +++++ 4 files changed, 81 insertions(+), 15 deletions(-) create mode 100644 config.yaml diff --git a/.env.example b/.env.example index 7df262d..5aa2255 100644 --- a/.env.example +++ b/.env.example @@ -1,19 +1,67 @@ +###### +# commons +###### + GENERIC_TIMEZONE=Europe/Paris +HASH_SALT=replace-me-with-a-random-string -POSTGRES_USER=changeUser -POSTGRES_PASSWORD=changePassword -POSTGRES_DB=n8n +# app name used in all container prefix +APP_NAME=super -POSTGRES_NON_ROOT_USER=changeUser -POSTGRES_NON_ROOT_PASSWORD=changePassword +# Admin user used to login in apps +ADMIN_MAIL=emmanuel.salomon@gmail.com +ADMIN_USER=adminuser # Only lowercase +ADMIN_PASSWORD=pass123 +# SMTP SMTP_HOST=smtp.gmail.com SMTP_USER=emmanuel.salomon@gmail.com -SMTP_PASS=nckctwxxqlidotss -SMTP_SENDER=contact@manutopik.fr +SMTP_PASS= # Set password +SMTP_SENDER=emmanuel.salomon@gmail.com -N8N_BASIC_AUTH_USER=changeUser -N8N_BASIC_AUTH_PASSWORD=changePassword -N8N_WEBHOOK_URL=https://n8n.manutopik.fr +###### +# Postgres +###### -HASURA_GRAPHQL_ADMIN_SECRET=changePassword \ No newline at end of file +# This config should stay only on server. Never share this info. +# POSTGRES_DB= # default to postgres +# POSTGRES_USER= # default to postgres # Only lowercase +POSTGRES_PASSWORD=rootpassword +# POSTGRES_NON_ROOT_USER= # default to ADMIN_USER +# POSTGRES_NON_ROOT_PASSWORD= # default to POSTGRES_PASSWORD + + +###### +# pgadmin +###### + +# PGADMIN_DEFAULT_MAIL= # default to ADMIN_MAIL +# PGADMIN_DEFAULT_PASSWORD= # default to ADMIN_PASSWORD + + +###### +# hasura +###### + +# HASURA_GRAPHQL_ADMIN_SECRET= # default to ADMIN_PASSWORD + +###### +# n8n +###### + +N8N_DB=n8n +# N8N_BASIC_AUTH_USER= # default to ADMIN_USER +# N8N_BASIC_AUTH_PASSWORD= # default to ADMIN_PASSWORD +# N8N_WEBHOOK_URL= + +###### +# umami +###### + +UMAMI_DB=umami + +###### +# listmonk +###### + +LISTMONK_DB=listmonk \ No newline at end of file diff --git a/README.md b/README.md index 54a70c4..734d67f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,15 @@ A preconfigured docker compose with awesome open source tool : - **umami** : open source analytics - **listmonk** : newsletters management +## Install + +Set config in `.env` file. See `.env.example`. +Set config in `composes/listmonk/config.toml`. + +## Development with hasura console + +Set password in `config.yaml` + ## Configuring pgAdmin 1. open `new server` popup diff --git a/composes/hasura/hasura.yml b/composes/hasura/hasura.yml index fc4b28f..bb9ff36 100644 --- a/composes/hasura/hasura.yml +++ b/composes/hasura/hasura.yml @@ -1,16 +1,16 @@ services: hasura: container_name: $APP_NAME-hasura - image: hasura/graphql-engine:v2.13.0 #.cli-migrations-v3 + image: hasura/graphql-engine:v2.13.0.cli-migrations-v3 restart: always ports: - 8080:8080 depends_on: postgres: condition: service_healthy - # volumes: - # - ../../hasura/migrations:/hasura-migrations - # - ../../hasura/metadata:/hasura-metadata + volumes: + - ../../hasura/migrations:/hasura-migrations + - ../../hasura/metadata:/hasura-metadata environment: - HASURA_GRAPHQL_DATABASE_URL=postgres://${POSTGRES_NON_ROOT_USER:-$ADMIN_USER}:${POSTGRES_NON_ROOT_PASSWORD:-$POSTGRES_PASSWORD}@postgres:5432/${HASURA_DB:-postgres} ## enable the console served by server diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..5ec79bf --- /dev/null +++ b/config.yaml @@ -0,0 +1,9 @@ +version: 3 +endpoint: http://localhost:8080 +admin_secret: pass123 +metadata_directory: hasura/metadata +migrations_directory: hasura/migrations +seeds_directory: hasura/seeds +actions: + kind: synchronous + handler_webhook_baseurl: http://localhost:3000