-
Notifications
You must be signed in to change notification settings - Fork 607
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove localosmosis Dockerfile (#2529)
* Remove localosmois Dockerfile * Retain .osmosisd folder
- Loading branch information
1 parent
2309773
commit 09b18a5
Showing
6 changed files
with
114 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
osmosisd: | ||
image: local:osmosis | ||
user: "root:root" | ||
build: | ||
context: ../../ | ||
dockerfile: Dockerfile | ||
args: | ||
RUNNER_IMAGE: alpine:3.16 | ||
GO_VERSION: 1.18 | ||
volumes: | ||
- ./.osmosisd/config:/osmosis/.osmosisd/config | ||
- ./.osmosisd/data:/osmosis/.osmosisd/data | ||
- ./.osmosisd/wasm:/osmosis/.osmosisd/wasm | ||
- ./scripts/setup.sh:/osmosis/setup.sh | ||
- ./.osmosisd/:/osmosis/.osmosisd/ | ||
entrypoint: | ||
- /osmosis/setup.sh | ||
ports: | ||
- "26657:26657" | ||
- "1317:1317" | ||
- "9090:9090" | ||
- "9091:9091" | ||
- 26657:26657 | ||
- 1317:1317 | ||
- 9090:9090 | ||
- 9091:9091 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#!/bin/sh | ||
|
||
CHAIN_ID=localosmosis | ||
OSMOSIS_HOME=$HOME/.osmosisd | ||
CONFIG_FOLDER=$OSMOSIS_HOME/config | ||
MONIKER=val | ||
|
||
MNEMONIC="satisfy adjust timber high purchase tuition stool faith fine install that you unaware feed domain license impose boss human eager hat rent enjoy dawn" | ||
|
||
install_prerequisites () { | ||
apk add dasel | ||
} | ||
|
||
edit_genesis () { | ||
|
||
GENESIS=$CONFIG_FOLDER/genesis.json | ||
|
||
# Update staking module | ||
dasel put string -f $GENESIS '.app_state.staking.params.bond_denom' 'uosmo' | ||
dasel put string -f $GENESIS '.app_state.staking.params.unbonding_time' '240s' | ||
|
||
# Update crisis module | ||
dasel put string -f $GENESIS '.app_state.crisis.constant_fee.denom' 'uosmo' | ||
|
||
# Udpate gov module | ||
dasel put string -f $GENESIS '.app_state.gov.voting_params.voting_period' '60s' | ||
dasel put string -f $GENESIS '.app_state.gov.deposit_params.min_deposit.[0].denom' 'uosmo' | ||
|
||
# Update epochs module | ||
dasel put string -f $GENESIS '.app_state.epochs.epochs.[1].duration' "60s" | ||
|
||
# Update poolincentives module | ||
dasel put string -f $GENESIS '.app_state.poolincentives.lockable_durations.[0]' "120s" | ||
dasel put string -f $GENESIS '.app_state.poolincentives.lockable_durations.[1]' "180s" | ||
dasel put string -f $GENESIS '.app_state.poolincentives.lockable_durations.[2]' "240s" | ||
dasel put string -f $GENESIS '.app_state.poolincentives.params.minted_denom' "uosmo" | ||
|
||
# Update incentives module | ||
dasel put string -f $GENESIS '.app_state.incentives.lockable_durations.[0]' "1s" | ||
dasel put string -f $GENESIS '.app_state.incentives.lockable_durations.[1]' "120s" | ||
dasel put string -f $GENESIS '.app_state.incentives.lockable_durations.[2]' "180s" | ||
dasel put string -f $GENESIS '.app_state.incentives.lockable_durations.[3]' "240s" | ||
dasel put string -f $GENESIS '.app_state.incentives.params.distr_epoch_identifier' "day" | ||
|
||
# Update mint module | ||
dasel put string -f $GENESIS '.app_state.mint.params.mint_denom' "uosmo" | ||
dasel put string -f $GENESIS '.app_state.mint.params.epoch_identifier' "day" | ||
|
||
# Update gamm module | ||
dasel put string -f $GENESIS '.app_state.gamm.params.pool_creation_fee.[0].denom' "uosmo" | ||
|
||
# Update txfee basedenom | ||
dasel put string -f $GENESIS '.app_state.txfees.basedenom' "uosmo" | ||
} | ||
|
||
add_genesis_accounts () { | ||
|
||
osmosisd add-genesis-account osmo1phaxpevm5wecex2jyaqty2a4v02qj7qmlmzk5a 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo18s5lynnmx37hq4wlrw9gdn68sg2uxp5rgk26vv 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo1qwexv7c6sm95lwhzn9027vyu2ccneaqad4w8ka 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo14hcxlnwlqtq75ttaxf674vk6mafspg8xwgnn53 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo12rr534cer5c0vj53eq4y32lcwguyy7nndt0u2t 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo1nt33cjd5auzh36syym6azgc8tve0jlvklnq7jq 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo10qfrpash5g2vk3hppvu45x0g860czur8ff5yx0 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo1f4tvsdukfwh6s9swrc24gkuz23tp8pd3e9r5fa 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo1myv43sqgnj5sm4zl98ftl45af9cfzk7nhjxjqh 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
osmosisd add-genesis-account osmo14gs9zqh8m49yy9kscjqu9h72exyf295afg6kgk 100000000000uosmo,100000000000uion --home $OSMOSIS_HOME | ||
|
||
echo $MNEMONIC | osmosisd keys add $MONIKER --recover --keyring-backend=test --home $OSMOSIS_HOME | ||
osmosisd gentx $MONIKER 500000000uosmo --keyring-backend=test --chain-id=$CHAIN_ID --home $OSMOSIS_HOME | ||
|
||
osmosisd collect-gentxs --home $OSMOSIS_HOME | ||
} | ||
|
||
edit_config () { | ||
# Remove seeds | ||
dasel put string -f $CONFIG_FOLDER/config.toml '.p2p.seeds' '' | ||
|
||
# Expose the rpc | ||
dasel put string -f $CONFIG_FOLDER/config.toml '.rpc.laddr' "tcp://0.0.0.0:26657" | ||
} | ||
|
||
if [[ ! -d $CONFIG_FOLDER ]] | ||
then | ||
echo $MNEMONIC | osmosisd init -o --chain-id=$CHAIN_ID --home $OSMOSIS_HOME --recover $MONIKER | ||
install_prerequisites | ||
edit_genesis | ||
add_genesis_accounts | ||
edit_config | ||
fi | ||
|
||
osmosisd start --home $OSMOSIS_HOME |
This file was deleted.
Oops, something went wrong.