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

small podman guide #642

Open
VelVet85 opened this issue Aug 22, 2024 · 1 comment
Open

small podman guide #642

VelVet85 opened this issue Aug 22, 2024 · 1 comment
Labels
Type: Enhancement New feature or request

Comments

@VelVet85
Copy link

VelVet85 commented Aug 22, 2024

Heya, decided do write a small guide for podman seeing that it's becoming a lot more popular lately
This is for a rootless podman btw, ok here we go:

podman pod create --hostname ocean --name ocean -p 8000:8000 -p 9000:9000 -p 9001:9001 -p 9002:9002 -p 9003:9003

mkdir -p ${HOME}/ocean/typesense-data

podman run -d \              
  --name ocean-db \  
  --pod ocean \
  --volume ${HOME}/ocean/typesense-data:/data \
  docker.io/typesense/typesense:26.0 --data-dir=/data --api-key=xyz --enable-cors

podman run -d \
  --name ocean-node \
  --label io.containers.autoupdate=registry \
  --pod ocean \
  --restart=unless-stopped \
  -e PRIVATE_KEY=0x11elk2319sdf77dsfj23023923234asdfaerasdfasfawe \
  -e RPCS='{"1":{"rpc":"https://ethereum-rpc.publicnode.com","fallbackRPCs":["https://rpc.ankr.com/eth","https://1rpc.io/eth","https://eth.api.onfinality.io/public"],"chainId":1,"network":"mainnet","chunkSize":100},"10":{"rpc":"https://mainnet.optimism.io","fallbackRPCs":["https://optimism-mainnet.public.blastapi.io","https://rpc.ankr.com/optimism","https://optimism-rpc.publicnode.com"],"chainId":10,"network":"optimism","chunkSize":100},"137":{"rpc":"https://polygon-rpc.com/","fallbackRPCs":["https://polygon-mainnet.public.blastapi.io","https://1rpc.io/matic","https://rpc.ankr.com/polygon"],"chainId":137,"network":"polygon","chunkSize":100},"23294":{"rpc":"https://sapphire.oasis.io","fallbackRPCs":["https://1rpc.io/oasis/sapphire"],"chainId":23294,"network":"sapphire","chunkSize":100}}' \
  -e INDEXER_NETWORKS="[10,137]" \
  -e DB_URL="http://localhost:8108/?apiKey=xyz" \
  -e ALLOWED_ADMINS='["0x0A3asdf42asa231231"]' \
  -e P2P_ANNOUNCE_ADDRESSES='["/ip4/215.54.47.221/tcp/9000","/ip4/215.54.47.221/tcp/9001","/ip6/2001:0db6:87a3::2114:8f2e:0f70:1a11/tcp/9002","/ip6/2001:0db6:87a3::2114:8f2e:0f70:1a11/ws/tcp/9003"]' \
  docker.io/oceanprotocol/ocean-node:latest
  
cd ~/.config/systemd/user/

loginctl enable-linger $USER
  
podman generate systemd --new --files --name ocean
  
systemctl --user enable pod-ocean.service

systemctl --user restart pod-ocean.service

also do not forget to open/forward all those ports on your firewall and/or your router.

@VelVet85 VelVet85 added the Type: Enhancement New feature or request label Aug 22, 2024
@jamiehewitt15
Copy link
Member

Can you put these suggested changes into a pull request and then we will review it and give you feedback? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants