Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add datalayer pg #6

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
######################################################
############### DATALAYER POSTGRES ###################
######################################################
DATALAYER_POSTGRES_PASSWORD=testing
DATALAYER_PG_USER=postgres
DATALAYER_PG_DATABASE=datalayer-postgres
DATALAYER_POSTGRES_EXPOSED_PORT=5434


############################################################
############### ENVIO POSTGRES & INDEXER ###################
############################################################
ENVIO_POSTGRES_PASSWORD=testing
ENVIO_PG_USER=postgres
ENVIO_PG_DATABASE=envio-dev

############################################
############### POSTGRES ###################
############################################
POSTGRES_EXPOSED_PORT=5433
POSTGRES_PASSWORD=testing
POSTGRES_USER=postgres
POSTGRES_DB=envio-dev
ENVIO_POSTGRES_EXPOSED_PORT=5433

############################################
############### INDEXER ####################
############################################
ENVIO_PG_HOST=envio-postgres
ENVIO_PG_PORT=5432
HASURA_GRAPHQL_ENDPOINT=http://graphql-engine:8080/v1/metadata
TUI_OFF=true

############################################
############### HASURA #####################
Expand All @@ -17,15 +38,4 @@ HASURA_GRAPHQL_NO_OF_RETRIES=10
HASURA_GRAPHQL_ADMIN_SECRET=testing
HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES="true"
PORT=8080
HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public

############################################
############### INDEXER ####################
############################################
ENVIO_PG_HOST=envio-postgres
ENVIO_PG_PORT=5432
ENVIO_POSTGRES_PASSWORD=testing
ENVIO_PG_USER=postgres
ENVIO_PG_DATABASE=envio-dev
HASURA_GRAPHQL_ENDPOINT=http://graphql-engine:8080/v1/metadata
TUI_OFF=true
HASURA_GRAPHQL_UNAUTHORIZED_ROLE=public
25 changes: 23 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
services:
datalayer-postgres:
image: postgres:16
restart: always
ports:
- "${DATALAYER_POSTGRES_EXPOSED_PORT:-5432}:5432"
volumes:
- db_data:/var/lib/datalayer-postgresql/data
env_file:
- .env
environment:
POSTGRES_DB: ${DATALAYER_PG_DATABASE}
POSTGRES_USER: ${DATALAYER_PG_USER}
POSTGRES_PASSWORD: ${DATALAYER_POSTGRES_PASSWORD}
networks:
- datalayer
envio-postgres:
image: postgres:16
restart: always
ports:
- "${POSTGRES_PORT:-5433}:5432"
- "${ENVIO_POSTGRES_EXPOSED_PORT:-5433}:5432"
volumes:
- db_data:/var/lib/postgresql/data
- db_data:/var/lib/envio-postgresql/data
env_file:
- .env
environment:
POSTGRES_DB: ${ENVIO_PG_DATABASE}
POSTGRES_USER: ${ENVIO_PG_USER}
POSTGRES_PASSWORD: ${ENVIO_POSTGRES_PASSWORD}
networks:
- indexer-service
graphql-engine:
Expand Down Expand Up @@ -46,3 +65,5 @@ volumes:
networks:
indexer-service:
name: indexer_test_network
datalayer:
name: datalayer_test_network