Skip to content

Commit

Permalink
Merge pull request #1308 from iotaledger/fix_devnet
Browse files Browse the repository at this point in the history
Update dockerfile, fix docker-compose file
  • Loading branch information
lmoe authored Sep 15, 2022
2 parents 510b9eb + 3c0ece4 commit 6a4e556
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
32 changes: 24 additions & 8 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
Dockerfile
.github
.git
.*
.git
.github
.github
.idea
.vscode
.waypoint
*.bat
*.log
*.md
*.png
*.toml
*.tpl
*.hcl
contracts/wasm
Dockerfile
docOps/
documentation
evmemulator
gascalibration
packages/snapshot
packges/vm/wasmlib
schema
snapshot
tools
wal
wasp
wasp-cli
*.log
waspdb/
docOps/
tools/devnet
tools/cluster
wasp-cluster
waspdb

3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG BUILD_LD_FLAGS=""
ARG BUILD_TARGET="./..."

WORKDIR /wasp
RUN mkdir waspdb

# Make sure that modules only get pulled when the module file has changed
COPY go.mod go.sum ./
Expand All @@ -16,6 +17,7 @@ RUN go mod verify
# Project build stage
COPY . .


RUN go build -o . -tags=${BUILD_TAGS} -ldflags="${BUILD_LD_FLAGS}" ${BUILD_TARGET}

############################
Expand All @@ -35,6 +37,7 @@ EXPOSE 4000/udp

# Copy the app dir into distroless image
COPY --chown=nonroot:nonroot --from=build /wasp/${FINAL_BINARY} /usr/bin/
COPY --chown=nonroot:nonroot --from=build /wasp/waspdb /waspdb

WORKDIR /usr/bin/
USER nonroot
Expand Down
9 changes: 7 additions & 2 deletions tools/devnet/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.9"
services:
hornet-nest:
image: iotaledger/hornet-nest:2.0.0-beta.7
image: iotaledger/hornet-nest:2.0.0-beta.8
networks:
- wasp-net
ports:
Expand All @@ -14,14 +14,19 @@ services:
build:
context: ../../
dockerfile: Dockerfile
command:
- "--dashboard.auth.scheme=none"
- "--webapi.auth.scheme=none"
- "--inx.address=hornet-nest:9029"
- "--database.directory=/waspdb"
container_name: wasp
depends_on:
- hornet-nest
restart: on-failure:10
networks:
- wasp-net
volumes:
- wasp-db:/wasp/waspdb
- wasp-db:/waspdb
- ./wasp.config.json:/etc/wasp_config.json
expose:
- "4000/udp" # Peering
Expand Down

0 comments on commit 6a4e556

Please sign in to comment.