initiate docker-compose for monorepo
This commit is contained in:
parent
38b3647eaa
commit
22c73baf38
2303
conf/keycloak_conf/example-realm.json
Normal file
2303
conf/keycloak_conf/example-realm.json
Normal file
File diff suppressed because it is too large
Load Diff
21
conf/sample.env_app-backend
Normal file
21
conf/sample.env_app-backend
Normal file
@ -0,0 +1,21 @@
|
||||
## 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
|
||||
## 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 run console offline (i.e load console assets from server instead of CDN)
|
||||
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
|
||||
## uncomment next line to set an admin secret
|
||||
HASURA_GRAPHQL_ADMIN_SECRET=myadminsecretkey
|
||||
HASURA_GRAPHQL_UNAUTHORIZED_ROLE="public"
|
||||
HASURA_GRAPHQL_METADATA_DEFAULTS='{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
|
||||
HASURA_GRAPHQL_JWT_SECRET={"type": "RS256", "key": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"}
|
||||
|
||||
# Environment variable for auto migrate
|
||||
HASURA_GRAPHQL_MIGRATIONS_DIR=/migrations
|
||||
HASURA_GRAPHQL_METADATA_DIR=/metadata
|
||||
HASURA_GRAPHQL_ENABLE_CONSOLE='true'
|
||||
1
conf/sample.env_app-backend-postgres
Normal file
1
conf/sample.env_app-backend-postgres
Normal file
@ -0,0 +1 @@
|
||||
POSTGRES_PASSWORD=postgrespassword
|
||||
19
conf/sample.env_web-client
Normal file
19
conf/sample.env_web-client
Normal file
@ -0,0 +1,19 @@
|
||||
NEXT_PUBLIC_ENV=development
|
||||
NEXT_PUBLIC_API_URL=
|
||||
NEXT_PUBLIC_WEB_URL=
|
||||
NEXT_PUBLIC_SSE_INFERENCE_ENDPOINT=
|
||||
NEXT_PUBLIC_BE_KEY=aCOHRBM6uJEdLQpp
|
||||
NEXT_PUBLIC_DISCORD_INVITATION_URL=
|
||||
NEXT_PUBLIC_GLEAP_API_KEY=
|
||||
NEXT_PUBLIC_DOWNLOAD_APP_IOS=
|
||||
NEXT_PUBLIC_DOWNLOAD_APP_ANDROID=
|
||||
NEXT_PUBLIC_POSTHOG_API_KEY=
|
||||
NEXT_PUBLIC_SENTRY_DNS=
|
||||
KEYCLOAK_CLIENT_ID=ce02d0ff-b633-4d79-8a33-2c8241017d72
|
||||
KEYCLOAK_CLIENT_SECRET=oMtCPAV7diKpE564SBspgKj4HqlKM4Hy
|
||||
AUTH_ISSUER=http://keycloak:8088/realms/hasura
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
NEXTAUTH_SECRET=my-secret
|
||||
END_SESSION_URL=http://keycloak:8088/realms/new-realm/protocol/openid-connect/logout
|
||||
REFRESH_TOKEN_URL=http://keycloak:8088/realms/new-realm/protocol/openid-connect/token
|
||||
HASURA_ADMIN_TOKEN=myadminsecretkey
|
||||
@ -1,13 +1,14 @@
|
||||
# docker version
|
||||
version: "3"
|
||||
|
||||
volumes:
|
||||
keycloak_postgres_data:
|
||||
# volumes:
|
||||
# keycloak_postgres_data:
|
||||
# db_data:
|
||||
|
||||
services:
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:${KEYCLOAK_VERSION-22.0.0}
|
||||
command: start-dev
|
||||
command: ["start-dev", "--import-realm", "--http-port", "8088"]
|
||||
environment:
|
||||
KC_DB: postgres
|
||||
KC_DB_URL_HOST: keycloak_postgres
|
||||
@ -17,8 +18,10 @@ services:
|
||||
KC_DB_SCHEMA: ${KC_DB_SCHEMA:-public}
|
||||
KEYCLOAK_ADMIN: ${KEYCLOAK_ADMIN-admin}
|
||||
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD-admin}
|
||||
volumes:
|
||||
- ./conf/keycloak_conf:/opt/keycloak/data/import
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8088:8088"
|
||||
depends_on:
|
||||
keycloak_postgres:
|
||||
condition: service_healthy
|
||||
@ -37,27 +40,71 @@ services:
|
||||
PGPORT: ${POSTGRES_PORT:-5432}
|
||||
healthcheck:
|
||||
test: "exit 0"
|
||||
volumes:
|
||||
- keycloak_postgres_data:/data/postgres
|
||||
# volumes:
|
||||
# - keycloak_postgres_data:/data/postgres
|
||||
ports:
|
||||
- ${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}
|
||||
networks:
|
||||
jan_community:
|
||||
|
||||
keycloak_config_cli:
|
||||
image: adorsys/keycloak-config-cli:latest
|
||||
depends_on:
|
||||
- keycloak
|
||||
postgres:
|
||||
image: postgres:13
|
||||
restart: always
|
||||
# volumes:
|
||||
# - db_data:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- conf/sample.env_app-backend-postgres
|
||||
graphql-engine:
|
||||
image: hasura/graphql-engine:v2.31.0.cli-migrations-v3
|
||||
ports:
|
||||
- "8080:8080"
|
||||
restart: always
|
||||
env_file:
|
||||
- conf/sample.env_app-backend
|
||||
volumes:
|
||||
- ./conf/keycloak_conf:/config
|
||||
- ./app-backend/hasura/migrations:/migrations
|
||||
- ./app-backend/hasura/metadata:/metadata
|
||||
depends_on:
|
||||
data-connector-agent:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
jan_community:
|
||||
|
||||
data-connector-agent:
|
||||
image: hasura/graphql-data-connector:v2.31.0
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:8081
|
||||
environment:
|
||||
KEYCLOAK_URL: http://keycloak:8080
|
||||
KEYCLOAK_USER: ${KEYCLOAK_ADMIN-admin}
|
||||
KEYCLOAK_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD-admin}
|
||||
KEYCLOAK_AVAILABILITYCHECK_ENABLED: 'true'
|
||||
KEYCLOAK_AVAILABILITYCHECK_TIMEOUT: 120s
|
||||
IMPORT_FILES_LOCATIONS: '/config/*'
|
||||
DEBUG: 'true'
|
||||
QUARKUS_LOG_LEVEL: ERROR # FATAL, ERROR, WARN, INFO, DEBUG, TRACE
|
||||
## https://quarkus.io/guides/opentelemetry#configuration-reference
|
||||
QUARKUS_OPENTELEMETRY_ENABLED: "false"
|
||||
## QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/athena/health"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 5s
|
||||
networks:
|
||||
jan_community:
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ./web-client
|
||||
dockerfile: dev.Dockerfile
|
||||
container_name: jan_web
|
||||
restart: always
|
||||
env_file:
|
||||
- conf/sample.env_web-client
|
||||
volumes:
|
||||
- .:/app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
networks:
|
||||
jan_community:
|
||||
|
||||
networks:
|
||||
jan_community:
|
||||
jan_community:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user