Skip to content

Commit

Permalink
Update tasks & compose
Browse files Browse the repository at this point in the history
  • Loading branch information
huuhait committed Nov 25, 2022
1 parent d0de0ba commit eee96a3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
9 changes: 8 additions & 1 deletion lib/tasks/db.rake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace :db do
task :migrate, [:command] do |task, args|
Rake::Task["render:config"].execute
puts '----- Running migrate database -----'
sh 'docker-compose run --rm barong sh -c "./barong migration"'
sh 'docker-compose run --rm peatio sh -c "./peatio migration"'
sh 'docker-compose run --rm barong sh -c "./barong migration"'
sh 'docker-compose run --rm kouda sh -c "./kouda migration"'
sh 'docker-compose run --rm quantex sh -c "./quantex migration"'
end
Expand All @@ -24,6 +24,13 @@ namespace :db do
sh 'docker-compose run --rm peatio sh -c "./peatio seed"'
end

task :views, [:command] do |task, args|
Rake::Task["render:config"].execute
puts '----- Running create views -----'
sh 'docker-compose run --rm barong sh -c "./barong create_views --schema_registry_addr http://redpanda-0:8081"'
sh 'docker-compose run --rm peatio sh -c "./peatio create_views --schema_registry_addr http://redpanda-0:8081"'
end

task :setup, [:command] do |task, args|
Rake::Task["vault:setup"].execute
Rake::Task["render:config"].execute
Expand Down
14 changes: 0 additions & 14 deletions templates/compose/backend.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ services:
volumes:
- ../data/redis:/data

questdb:
image: questdb/questdb:6.5.5
restart: always
ports:
- "8812:8812"
- "9009:9009"
- "8041:9000"
- "9003:9003"
volumes:
- ../data/questdb:/root/.questdb/db
environment:
QDB_CAIRO_COMMIT_LAG: 1000
QDB_METRICS_ENABLED: "true"

vault:
image: vault:1.3.0
restart: always
Expand Down
20 changes: 17 additions & 3 deletions templates/compose/databases.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
db:
image: debezium/postgres
image: debezium/postgres:13
ports:
- "5432:5432"
volumes:
Expand All @@ -11,13 +11,27 @@ services:
- POSTGRES_USER=zsmartex
- POSTGRES_PASSWORD=zsmartex

questdb:
image: questdb/questdb:6.5.5
restart: always
ports:
- "8812:8812"
- "9009:9009"
- "8041:9000"
- "9003:9003"
volumes:
- ../data/questdb:/root/.questdb/db
environment:
QDB_CAIRO_COMMIT_LAG: 1000
QDB_METRICS_ENABLED: "true"
QDB_DEBUG: "true"

materialize:
image: materialize/materialized
image: materialize/materialized:v0.26.5
ports:
- "6875:6875"
volumes:
- ../data/materialize:/mzdata
command: --logical-compaction-window 10s

adminer:
image: adminer
Expand Down
1 change: 0 additions & 1 deletion templates/compose/streams.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ services:
CONNECT_OFFSET_STORAGE_PARTITIONS: 100
CONNECT_STATUS_STORAGE_PARTITIONS: 100
CONNECT_PLUGIN_PATH: /usr/share/java,/connectors,/usr/share/confluent-hub-components/
CONNECT_OFFSET_FLUSH_INTERVAL_MS: 1000
command:
- bash
- -c
Expand Down

0 comments on commit eee96a3

Please sign in to comment.