Skip to content

Commit

Permalink
published new version
Browse files Browse the repository at this point in the history
  • Loading branch information
dan13ram committed Jul 2, 2024
1 parent e10dc35 commit 16b0e16
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ docker/

# secrets
secrets/

# make
Makefile
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ open_test_coverage :; bash ./coverage.sh && open ./coverage.html
build :; go build -o wpokt-oracle .

.PHONY: docker_build
docker_build :; docker buildx build . -t dan13ram/wpokt-oracle:v0.0.1 --file ./docker/Dockerfile
docker_build :; docker buildx build . -t dan13ram/wpokt-oracle:v0.0.2 --file ./docker/Dockerfile

.PHONY: docker_push
docker_push :; docker push dan13ram/wpokt-oracle:v0.0.1
docker_push :; docker push dan13ram/wpokt-oracle:v0.0.2

.PHONY: docker_dev
docker_dev : docker_one
Expand Down
66 changes: 33 additions & 33 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,45 @@ RUN GOOS=linux go build -o /bin/oracle
# set environment variables

# General configurations
ENV HEALTH_CHECK_INTERVAL_MS ${HEALTH_CHECK_INTERVAL_MS}
ENV HEALTH_CHECK_READ_LAST_HEALTH ${HEALTH_CHECK_READ_LAST_HEALTH}
ENV LOGGER_LEVEL ${LOGGER_LEVEL}
ENV LOGGER_FORMAT ${LOGGER_FORMAT}
ENV MONGODB_URI ${MONGODB_URI}
ENV MONGODB_DATABASE ${MONGODB_DATABASE}
ENV MONGODB_TIMEOUT_MS ${MONGODB_TIMEOUT_MS}
ENV HEALTH_CHECK_INTERVAL_MS=${HEALTH_CHECK_INTERVAL_MS}
ENV HEALTH_CHECK_READ_LAST_HEALTH=${HEALTH_CHECK_READ_LAST_HEALTH}
ENV LOGGER_LEVEL=${LOGGER_LEVEL}
ENV LOGGER_FORMAT=${LOGGER_FORMAT}
ENV MONGODB_URI=${MONGODB_URI}
ENV MONGODB_DATABASE=${MONGODB_DATABASE}
ENV MONGODB_TIMEOUT_MS=${MONGODB_TIMEOUT_MS}

# Mnemonic (Usually a sensitive value, better to set via Docker secrets or external environment)
ENV SIGNER_MNEMONIC ${SIGNER_MNEMONIC}
ENV SIGNER_GCP_KMS_KEY_NAME ${SIGNER_GCP_KMS_KEY_NAME}
ENV SIGNER_MNEMONIC=${SIGNER_MNEMONIC}
ENV SIGNER_GCP_KMS_KEY_NAME=${SIGNER_GCP_KMS_KEY_NAME}

# cosmos network
ENV COSMOS_NETWORK_START_BLOCK_HEIGHT ${COSMOS_NETWORK_START_BLOCK_HEIGHT}
ENV COSMOS_NETWORK_CONFIRMATIONS ${COSMOS_NETWORK_CONFIRMATIONS}
ENV COSMOS_NETWORK_RPC_URL ${COSMOS_NETWORK_RPC_URL}
ENV COSMOS_NETWORK_GRPC_ENABLED ${COSMOS_NETWORK_GRPC_ENABLED}
ENV COSMOS_NETWORK_GRPC_HOST ${COSMOS_NETWORK_GRPC_HOST}
ENV COSMOS_NETWORK_GRPC_PORT ${COSMOS_NETWORK_GRPC_PORT}
ENV COSMOS_NETWORK_TIMEOUT_MS ${COSMOS_NETWORK_TIMEOUT_MS}
ENV COSMOS_NETWORK_CHAIN_ID ${COSMOS_NETWORK_CHAIN_ID}
ENV COSMOS_NETWORK_CHAIN_NAME ${COSMOS_NETWORK_CHAIN_NAME}
ENV COSMOS_NETWORK_TX_FEE ${COSMOS_NETWORK_TX_FEE}
ENV COSMOS_NETWORK_BECH32_PREFIX ${COSMOS_NETWORK_BECH32_PREFIX}
ENV COSMOS_NETWORK_COIN_DENOM ${COSMOS_NETWORK_COIN_DENOM}
ENV COSMOS_NETWORK_MULTISIG_ADDRESS ${COSMOS_NETWORK_MULTISIG_ADDRESS}
ENV COSMOS_NETWORK_MULTISIG_PUBLIC_KEYS ${COSMOS_NETWORK_MULTISIG_PUBLIC_KEYS}
ENV COSMOS_NETWORK_MULTISIG_THRESHOLD ${COSMOS_NETWORK_MULTISIG_THRESHOLD}
ENV COSMOS_NETWORK_MESSAGE_MONITOR_ENABLED ${COSMOS_NETWORK_MESSAGE_MONITOR_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_MONITOR_INTERVAL_MS ${COSMOS_NETWORK_MESSAGE_MONITOR_INTERVAL_MS}
ENV COSMOS_NETWORK_MESSAGE_SIGNER_ENABLED ${COSMOS_NETWORK_MESSAGE_SIGNER_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_SIGNER_INTERVAL_MS ${COSMOS_NETWORK_MESSAGE_SIGNER_INTERVAL_MS}
ENV COSMOS_NETWORK_MESSAGE_RELAYER_ENABLED ${COSMOS_NETWORK_MESSAGE_RELAYER_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_RELAYER_INTERVAL_MS ${COSMOS_NETWORK_MESSAGE_RELAYER_INTERVAL_MS}

ENV YAML_FILE ${YAML_FILE}
ENV COSMOS_NETWORK_START_BLOCK_HEIGHT=${COSMOS_NETWORK_START_BLOCK_HEIGHT}
ENV COSMOS_NETWORK_CONFIRMATIONS=${COSMOS_NETWORK_CONFIRMATIONS}
ENV COSMOS_NETWORK_RPC_URL=${COSMOS_NETWORK_RPC_URL}
ENV COSMOS_NETWORK_GRPC_ENABLED=${COSMOS_NETWORK_GRPC_ENABLED}
ENV COSMOS_NETWORK_GRPC_HOST=${COSMOS_NETWORK_GRPC_HOST}
ENV COSMOS_NETWORK_GRPC_PORT=${COSMOS_NETWORK_GRPC_PORT}
ENV COSMOS_NETWORK_TIMEOUT_MS=${COSMOS_NETWORK_TIMEOUT_MS}
ENV COSMOS_NETWORK_CHAIN_ID=${COSMOS_NETWORK_CHAIN_ID}
ENV COSMOS_NETWORK_CHAIN_NAME=${COSMOS_NETWORK_CHAIN_NAME}
ENV COSMOS_NETWORK_TX_FEE=${COSMOS_NETWORK_TX_FEE}
ENV COSMOS_NETWORK_BECH32_PREFIX=${COSMOS_NETWORK_BECH32_PREFIX}
ENV COSMOS_NETWORK_COIN_DENOM=${COSMOS_NETWORK_COIN_DENOM}
ENV COSMOS_NETWORK_MULTISIG_ADDRESS=${COSMOS_NETWORK_MULTISIG_ADDRESS}
ENV COSMOS_NETWORK_MULTISIG_PUBLIC_KEYS=${COSMOS_NETWORK_MULTISIG_PUBLIC_KEYS}
ENV COSMOS_NETWORK_MULTISIG_THRESHOLD=${COSMOS_NETWORK_MULTISIG_THRESHOLD}
ENV COSMOS_NETWORK_MESSAGE_MONITOR_ENABLED=${COSMOS_NETWORK_MESSAGE_MONITOR_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_MONITOR_INTERVAL_MS=${COSMOS_NETWORK_MESSAGE_MONITOR_INTERVAL_MS}
ENV COSMOS_NETWORK_MESSAGE_SIGNER_ENABLED=${COSMOS_NETWORK_MESSAGE_SIGNER_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_SIGNER_INTERVAL_MS=${COSMOS_NETWORK_MESSAGE_SIGNER_INTERVAL_MS}
ENV COSMOS_NETWORK_MESSAGE_RELAYER_ENABLED=${COSMOS_NETWORK_MESSAGE_RELAYER_ENABLED}
ENV COSMOS_NETWORK_MESSAGE_RELAYER_INTERVAL_MS=${COSMOS_NETWORK_MESSAGE_RELAYER_INTERVAL_MS}

ENV YAML_FILE=${YAML_FILE}

# ethereum networks (later setup via bash file)
ENV NUM_ETHEREUM_NETWORKS ${NUM_ETHEREUM_NETWORKS}
ENV NUM_ETHEREUM_NETWORKS=${NUM_ETHEREUM_NETWORKS}

# create app user
RUN adduser --group --system app
Expand Down
6 changes: 3 additions & 3 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- "38546"

oracle-one:
image: dan13ram/wpokt-oracle:v0.0.1
image: dan13ram/wpokt-oracle:v0.0.2
network_mode: host
entrypoint: ["/bin/sh", "-c", "sleep 30 && /app/set_eth_envs.sh && /bin/oracle --yaml /app/defaults/config.local.yml"]
environment:
Expand All @@ -30,7 +30,7 @@ services:
COSMOS_NETWORK_GRPC_ENABLED: false

oracle-two:
image: dan13ram/wpokt-oracle:v0.0.1
image: dan13ram/wpokt-oracle:v0.0.2
network_mode: host
entrypoint: ["/bin/sh", "-c", "sleep 30 && /app/set_eth_envs.sh && /bin/oracle --yaml /app/defaults/config.local.yml"]
environment:
Expand All @@ -39,7 +39,7 @@ services:
SIGNER_MNEMONIC: "shy smile praise educate custom fashion gun enjoy zero powder garden second"

oracle-three:
image: dan13ram/wpokt-oracle:v0.0.1
image: dan13ram/wpokt-oracle:v0.0.2
network_mode: host
entrypoint: ["/bin/sh", "-c", "sleep 30 && /app/set_eth_envs.sh && /bin/oracle --yaml /app/defaults/config.local.yml"]
environment:
Expand Down

0 comments on commit 16b0e16

Please sign in to comment.