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

Modify docker-compose.yml example so it is possible to run mainnet and testnet interchangeably #1638

Merged
merged 1 commit into from
May 7, 2020

Conversation

piotr-iohk
Copy link
Contributor

Issue Number

N/A

Overview

  • I have modified docker-compose.yml example so one can run it for testnet and mainnet interchangeably.

Comments

With current docker-compose.yml if one starts:

NETWORK=testnet docker-compose up

...runs it for a while and then starts:

NETWORK=mainnet docker-compose up

then she will get failure:

cardano-node_1    | Shutting down..
cardano-node_1    | ProtocolMagicIdMismatch "/data/db/protocolMagicId" (ProtocolMagicId {unProtocolMagicId = 764824073}) (ProtocolMagicId {unProtocolMagicId = 1097911063})
cardano-node_1    |

as the volumes will interfere with each other.

After this change one can run it for testnet and mainnet interchangeably...

@piotr-iohk piotr-iohk added the RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG label May 7, 2020
@piotr-iohk piotr-iohk self-assigned this May 7, 2020
@piotr-iohk piotr-iohk requested a review from KtorZ May 7, 2020 11:35
node-mainnet-db:
node-testnet-db:
wallet-mainnet-db:
wallet-testnet-db:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiosity, did you try templating this with an ENV var too 🤔 ?

node-${NETWORK}-db: 
wallet-${NETWORK}-db:

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did, it doesn't work :(

ERROR: The Compose file './docker-compose.yml' is invalid because:
volumes value 'node-${NETWORK}-db', 'wallet-${NETWORK}-db' do not match any of the regexes: '^[a-zA-Z0-9._-]+$'

README.md Outdated
or to be accessed via CLI, e.g.:

```
docker run --network host inputoutput/cardano-wallet network information
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run --rm, otherwise things rapidly get out of hands ^^"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@piotr-iohk piotr-iohk force-pushed the piotr/improve-docker-compose branch from afb9d53 to 92fb10f Compare May 7, 2020 12:15
@piotr-iohk
Copy link
Contributor Author

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 7, 2020

@iohk-bors iohk-bors bot merged commit db77165 into master May 7, 2020
@iohk-bors iohk-bors bot deleted the piotr/improve-docker-compose branch May 7, 2020 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RESOLVING ISSUE Mark a PR as resolving issues, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants