Skip to content

Commit

Permalink
Merge pull request #196 from hashcloak/feature/compose-template
Browse files Browse the repository at this point in the history
use template
  • Loading branch information
sc0Vu authored Mar 5, 2024
2 parents 01fed26 + 89febb6 commit 2144ed6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 110 deletions.
3 changes: 3 additions & 0 deletions Dockerfile.katzenmint
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ COPY --from=builder /go/Meson/katzenmint/katzenmint /go/bin/katzenmint

VOLUME /chain

HEALTHCHECK --interval=10s --timeout=10s --retries=10 \
CMD curl -f http://localhost:26657/block_results?height=1 || exit 1

ENTRYPOINT /go/bin/katzenmint run --config /chain/katzenmint.toml
159 changes: 49 additions & 110 deletions testnet/local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,200 +1,139 @@
version: "2"

services:
x-provider: &provider
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
entrypoint: ash /scripts/entrypoint.sh
depends_on:
auth1:
condition: service_healthy
auth2:
condition: service_healthy
auth3:
condition: service_healthy
auth4:
condition: service_healthy

x-mix: &mix
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
entrypoint: ash /scripts/entrypoint.sh
depends_on:
- auth1
- auth2
- auth3
- auth4
- provider1
- provider2

x-auth: &auth
restart: unless-stopped
image: katzenmint/pki
build:
context: ../../
dockerfile: Dockerfile.katzenmint

services:
provider1:
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
<<: *provider
volumes:
- ./conf/provider1:/conf
- ./scripts:/scripts
entrypoint: ash /scripts/entrypoint.sh
ports:
- "127.0.0.1:30001:30001"
- "127.0.0.1:40001:40001"
depends_on:
auth1:
condition: service_healthy
auth2:
condition: service_healthy
auth3:
condition: service_healthy
auth4:
condition: service_healthy
networks:
katzenmint_net:
ipv4_address: 172.29.1.2

provider2:
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
<<: *provider
volumes:
- ./conf/provider2:/conf
- ./scripts:/scripts
entrypoint: ash /scripts/entrypoint.sh
ports:
- "127.0.0.1:30002:30002"
- "127.0.0.1:40002:40002"
depends_on:
auth1:
condition: service_healthy
auth2:
condition: service_healthy
auth3:
condition: service_healthy
auth4:
condition: service_healthy
networks:
katzenmint_net:
ipv4_address: 172.29.1.3

mix1:
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
<<: *mix
volumes:
- ./conf/mix1:/conf
- ./scripts:/scripts
entrypoint: ash /scripts/entrypoint.sh
ports:
- "127.0.0.1:30004:30004"
- "127.0.0.1:40004:40004"
depends_on:
- auth1
- auth2
- auth3
- auth4
- provider1
- provider2
networks:
katzenmint_net:
ipv4_address: 172.29.1.4

mix2:
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
<<: *mix
volumes:
- ./conf/mix2:/conf
- ./scripts:/scripts
entrypoint: ash /scripts/entrypoint.sh
ports:
- "127.0.0.1:30005:30005"
- "127.0.0.1:40005:40005"
depends_on:
- auth1
- auth2
- auth3
- auth4
- provider1
- provider2
networks:
katzenmint_net:
ipv4_address: 172.29.1.5

mix3:
restart: unless-stopped
image: meson/server
build:
context: ../../
dockerfile: Dockerfile.server
<<: *mix
volumes:
- ./conf/mix3:/conf
- ./scripts:/scripts
entrypoint: ash /scripts/entrypoint.sh
ports:
- "127.0.0.1:30006:30006"
- "127.0.0.1:40006:40006"
depends_on:
- auth1
- auth2
- auth3
- auth4
- provider1
- provider2
networks:
katzenmint_net:
ipv4_address: 172.29.1.6

auth1:
restart: unless-stopped
image: katzenmint/pki
build:
context: ../../
dockerfile: Dockerfile.katzenmint
<<: *auth
volumes:
- ./conf/node1:/chain
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:26657/block_results?height=1"]
interval: 10s
timeout: 10s
retries: 10
ports:
- "127.0.0.1:21483:26657"
networks:
katzenmint_net:
ipv4_address: 172.29.1.7

auth2:
restart: unless-stopped
image: katzenmint/pki
build:
context: ../../
dockerfile: Dockerfile.katzenmint
<<: *auth
volumes:
- ./conf/node2:/chain
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:26657/block_results?height=1"]
interval: 10s
timeout: 10s
retries: 10
ports:
- "127.0.0.1:21484:26657"
networks:
katzenmint_net:
ipv4_address: 172.29.1.8

auth3:
restart: unless-stopped
image: katzenmint/pki
build:
context: ../../
dockerfile: Dockerfile.katzenmint
<<: *auth
volumes:
- ./conf/node3:/chain
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:26657/block_results?height=1"]
interval: 10s
timeout: 10s
retries: 10
ports:
- "127.0.0.1:21485:26657"
networks:
katzenmint_net:
ipv4_address: 172.29.1.9

auth4:
restart: unless-stopped
image: katzenmint/pki
build:
context: ../../
dockerfile: Dockerfile.katzenmint
<<: *auth
volumes:
- ./conf/node4:/chain
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:26657/block_results?height=1"]
interval: 10s
timeout: 10s
retries: 10
ports:
- "127.0.0.1:21486:26657"
networks:
Expand Down

0 comments on commit 2144ed6

Please sign in to comment.