Skip to content

chore: update repo to 0.6 alpha, add redis and dynamodb to mediator #55

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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
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
77 changes: 69 additions & 8 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,10 +1,71 @@
NODE_ENV=development
LOG_LEVEL=debug
AGENT_ENDPOINTS=http://localhost:3000

# POSTGRES_USER=
# POSTGRES_PASSWORD=
# POSTGRES_HOST=
# POSTGRES_ADMIN_USER=
# POSTGRES_ADMIN_PASSWORD=
###
# Message Pickup
###

# USE_PUSH_NOTIFICATIONS='true'
# NOTIFICATION_WEBHOOK_URL=
# Forwarding Strategy
MESSAGE_PICKUP__FORWARDING_STRATEGY=QueueAndLiveModeDelivery

# Default
# MESSAGE_PICKUP__STORAGE__TYPE=credo

# DynamoDB
MESSAGE_PICKUP__STORAGE__TYPE=dynamodb
MESSAGE_PICKUP__STORAGE__REGION=local
MESSAGE_PICKUP__STORAGE__ACCESS_KEY_ID=local
MESSAGE_PICKUP__STORAGE__SECRET_ACCESS_KEY=local

# Postgres
# MESSAGE__PICKUP__STORAGE__TYPE=postgres
# MESSAGE__PICKUP__STORAGE__HOST=localhost:5432
# MESSAGE__PICKUP__STORAGE__USER=postgres
# MESSAGE__PICKUP__STORAGE__PASSWORD=postgres
# MESSAGE__PICKUP__STORAGE__DATABASE=pickup

###
# Cache
###

# Default (in-memory)
# CACHE__TYPE=in-memory

# Redis
CACHE__TYPE=redis
CACHE__REDIS_URL=redis://127.0.0.1:6379

# ###
# # Askar
# ###

ASKAR__STORE_ID=mediator
ASKAR__STORE_KEY=mediator
ASKAR__DATABASE__TYPE=postgres # or sqlite
ASKAR__DATABASE__USER=postgres
ASKAR__DATABASE__PASSWORD=postgres
ASKAR__DATABASE__HOST=localhost:5432
ASKAR__DATABASE__ADMIN_USER=postgres
ASKAR__DATABASE__ADMIN_PASSWORD=postgres

###
# Drizzle
###

STORAGE__DIALECT=postgres # or sqlite
# STORAGE__DATABASE_URL="file:./apps/mediator/database.db"
STORAGE__DATABASE_URL="postgresql://postgres:postgres@localhost:5432/drizzle"

###
# Storage
###

STORAGE__TYPE=drizzle # or askar

###
# KMS
###

# KMS__TYPE=askar (default, only option)

# PUSH_NOTIFICATIONS__WEBHOOK_URL=
99 changes: 70 additions & 29 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,29 +1,70 @@
# Agent
AGENT_ENDPOINTS='https://example.ca,wss://example.ca'
INVITATION_URL='https://example.ca'
NOTIFICATION_WEBHOOK_URL=


# Push notification
USE_PUSH_NOTIFICATIONS='false'
PUSH_NOTIFICATION_TITLE='this appears in the title of the notification'
PUSH_NOTIFICATION_BODY='this appears in the body if the notification'

# Database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=85a52c9283b0
POSTGRES_ADMIN_USER=postgres
POSTGRES_ADMIN_PASSWORD=85a52c9283b0

# Firebase
FIREBASE_PROJECT_ID=some-project-X123
[email protected]
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----"

# Wallet
WALLET_KEY=a67d8724cb01c7c0b5d92f01fb052885
WALLET_NAME=mediator-dev # Will be database name.

PICKUP_TYPE=postgres
PICKUP_STRATEGY=QueueOnly
PICKUP_SETTINGS='{"useBaseConnection": true}'
LOG_LEVEL=debug
AGENT_ENDPOINTS=http://localhost:3000

###
# Message Pickup
###

# Forwarding Strategy
# MESSAGE_PICKUP__FORWARDING_STRATEGY=QueueAndLiveModeDelivery

# Default
# MESSAGE_PICKUP__STORAGE__TYPE=credo

# DynamoDB
MESSAGE_PICKUP__STORAGE__TYPE=dynamodb
MESSAGE_PICKUP__STORAGE__REGION=local
MESSAGE_PICKUP__STORAGE__ACCESS_KEY_ID=local
MESSAGE_PICKUP__STORAGE__SECRET_ACCESS_KEY=local

# Postgres
# MESSAGE__PICKUP__STORAGE__TYPE=postgres
# MESSAGE__PICKUP__STORAGE__HOST=localhost:5432
# MESSAGE__PICKUP__STORAGE__USER=postgres
# MESSAGE__PICKUP__STORAGE__PASSWORD=postgres
# MESSAGE__PICKUP__STORAGE__DATABASE=pickup

###
# Cache
###

# Default (in-memory)
# CACHE__TYPE=in-memory

# Redis
CACHE__TYPE=redis
CACHE__REDIS_URL=redis://127.0.0.1:6379

###
# Askar
###

ASKAR__STORE_ID=mediator-dev
ASKAR__STORE_KEY=mediator-dev
ASKAR__DATABASE__TYPE=sqlite # or postgres
# ASKAR__DATABASE__USER=postgres
# ASKAR__DATABASE__PASSWORD=postgres
# ASKAR__DATABASE__HOST=localhost:5432
# ASKAR__DATABASE__ADMIN_USER=postgres
# ASKAR__DATABASE__ADMIN_PASSWORD=postgres

###
# Drizzle
###

# STORAGE__DIALECT=sqlite # or postgres
# STORAGE__DATABASE_URL="file:./apps/mediator/database.db"

###
# Storage
###

# STORAGE__TYPE=drizzle # or askar

###
# KMS
###

# KMS__TYPE=askar (default, only option)

# PUSH_NOTIFICATIONS__WEBHOOK_URL=
2 changes: 1 addition & 1 deletion .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
uses: rrainn/[email protected]
with:
port: 8000
cors: '*'
cors: "*"

- uses: pnpm/action-setup@v4

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- v*
branches:
- 0.6.x-alpha
workflow_dispatch:
workflow_run:
workflows: [Quality]
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ node_modules
.env.local
.pnpm-store/
*.orig
.env.local
database.db
Loading
Loading