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

fix: add needed params in the docker composer file to activate batch pool delisting #1223

Merged
merged 1 commit into from
Apr 24, 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
3 changes: 2 additions & 1 deletion compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ services:
<<: *sdk-environment
API_URL: http://0.0.0.0:3003
QUEUES: ${QUEUES:-pool-delist-schedule,pool-metadata,pool-metrics,pool-rewards}
SCHEDULES: ${SCHEDULES:-/config/schedules.json}
STAKE_POOL_PROVIDER_URL: http://provider-server:3000/
METADATA_FETCH_MODE: ${METADATA_FETCH_MODE:-direct}
METADATA_FETCH_MODE: ${METADATA_FETCH_MODE:-smash}
SMASH_URL: ${SMASH_URL:-http://cardano-smash:3100/api/v1}
healthcheck:
test: ['CMD-SHELL', 'curl -s --fail http://localhost:3003/v1.0.0/health']
Expand Down
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions packages/cardano-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ services:
volumes:
- ./config/network/${NETWORK:-mainnet}:/config

pg-boss-worker:
volumes:
- ./environments/.schedules.json:/config/schedules.json

cardano-submit-api:
volumes:
- ./config/network/${NETWORK:-mainnet}:/config
Expand Down
2 changes: 1 addition & 1 deletion packages/cardano-services/environments/.env.local
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
METADATA_FETCH_MODE="smash"
SMASH_URL="http://cardano-smash:3100/api/v1"
SCHEDULES="environments/.schedule.local.json"
SCHEDULES="/config/schedules.json"
2 changes: 1 addition & 1 deletion packages/cardano-services/environments/.env.mainnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
HANDLE_POLICY_IDS=${HANDLE_POLICY_IDS:-f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a}
METADATA_FETCH_MODE="smash"
SMASH_URL="https://smash.cardano-mainnet.iohk.io/api/v1"
SCHEDULES="environments/.schedule.mainnet.json"
SCHEDULES="/config/schedules.json"
TOKEN_METADATA_SERVER_URL="https://tokens.cardano.org"
2 changes: 1 addition & 1 deletion packages/cardano-services/environments/.env.preprod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HANDLE_POLICY_IDS=${HANDLE_POLICY_IDS:-f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a}
OGMIOS_PORT=${OGMIOS_PORT:-1339}
METADATA_FETCH_MODE="smash"
SCHEDULES="environments/.schedule.preprod.json"
SCHEDULES="/config/schedules.json"
2 changes: 1 addition & 1 deletion packages/cardano-services/environments/.env.preview
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HANDLE_POLICY_IDS=${HANDLE_POLICY_IDS:-f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a}
OGMIOS_PORT=${OGMIOS_PORT:-1340}
METADATA_FETCH_MODE="smash"
SCHEDULES="environments/.schedule.preview.json"
SCHEDULES="/config/schedules.json"
10 changes: 0 additions & 10 deletions packages/cardano-services/environments/.schedule.preprod.json

This file was deleted.

10 changes: 0 additions & 10 deletions packages/cardano-services/environments/.schedule.preview.json

This file was deleted.

2 changes: 2 additions & 0 deletions packages/cardano-services/environments/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Cardano JS SDK | Docker Composer Environment Variables

This folder holds environment variable files for various Docker composer setups. The `.env` files are referenced in the `../package.json` file.
`schedules.json` file contains configuration for pg-boss schedules. The file can be copy-pasted separately for each network and each network can use it's own file specified in `.env.*`.
`schedules.json` file is attached as a volume while running our Docker Compose setup in `../docker-compose.yml`.
4 changes: 2 additions & 2 deletions packages/cardano-services/test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ describe('CLI', () => {

describe('schedules', () => {
testPgBoss('accepts a valid schedule file', 'pgboss', {
args: ['--schedules', 'environments/.schedule.local.json'],
env: { SCHEDULES: 'environments/.schedule.local.json' },
args: ['--schedules', 'environments/schedules.json'],
env: { SCHEDULES: 'environments/schedules.json' },
expectedArgs: {
args: { schedules: [{ cron: '0 * * * *', queue: 'pool-delist-schedule', scheduleOptions: {} }] }
}
Expand Down
1 change: 1 addition & 0 deletions packages/e2e/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ OGMIOS_URL='ws://localhost:1340/'
STAKE_POOL_PROVIDER_URL='http://localhost:4000/'
METADATA_FETCH_MODE="smash"
SMASH_URL="http://cardano-smash:3100/api/v1"
SCHEDULES="/config/schedules.json"

# Required by test:long-running
STAKE_POOL_PROJECTOR_URL='http://localhost:4002/'
4 changes: 4 additions & 0 deletions packages/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ services:
volumes:
- ./local-network/config/network:/config

pg-boss-worker:
volumes:
- ./schedules.json:/config/schedules.json

cardano-submit-api:
depends_on:
local-testnet:
Expand Down
Loading