Skip to content

Commit 5cf532c

Browse files
Updating hopr-admin (#2)
* Updating hopr-admin * Unifying pipelines * Install docker-compose * Add docker compose * create docker file * use different admin version * modify in dockerfile
1 parent bb8290b commit 5cf532c

File tree

4 files changed

+56
-11
lines changed

4 files changed

+56
-11
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
7+
- develop
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v2
18+
19+
- name: Set up Docker Compose
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y docker-compose
23+
1424
- name: Build and upload to IPFS
1525
run: |
1626
npm install

.github/workflows/release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,25 @@ name: Build (release package)
33
on:
44
push:
55
branches:
6-
- release
6+
- main
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v2
17+
18+
- name: Set up Docker Compose
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y docker-compose
22+
1323
- name: Build and publish to package repository
24+
id: publish
1425
run: |
1526
npm install
1627
npx @dappnode/dappnodesdk publish patch \
@@ -21,6 +32,22 @@ jobs:
2132
2233
echo "DNP (DAppNode Package) built and uploaded" >> $GITHUB_STEP_SUMMARY
2334
grep "ipfs" build.log >> $GITHUB_STEP_SUMMARY
35+
ipfs_hash=$(grep -oP 'Release hash : \K/ipfs/\w+' build.log)
36+
echo "ipfs_hash=$ipfs_hash" >> $GITHUB_OUTPUT
2437
env:
2538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2639
DEVELOPER_ADDRESS: "0x7305356ad936A06c4ea5DF45AD5E5C3ff9Db818E"
40+
41+
- name: Send message to Zulip
42+
uses: zulip/github-actions-zulip/send-message@v1
43+
with:
44+
api-key: ${{ secrets.ZULIP_API_KEY }}
45+
email: ${{ secrets.ZULIP_EMAIL }}
46+
organization-url: "https://hopr.zulipchat.com"
47+
type: "stream"
48+
to: "Releases"
49+
topic: "main"
50+
content: |
51+
A new hoprd dAppNode package (rotsee) version is available.
52+
- IPFS Hash: ${{ steps.publish.outputs.ipfs_hash }}
53+
Access to your dAppNode and check for the updates

docker-compose.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
version: "3.5"
22
services:
33
node:
4+
# Do not set image field here, it will be set automatically by the sdk.
45
build:
56
context: .
67
args:
78
UPSTREAM_VERSION: >-
89
2.1.0@sha256:28f5db3a37275edecb3b4d52f2d254832bf3346d9464a538c419575a40d8b744
910
ports:
10-
- "3101"
11+
- "3101:3101/tcp"
1112
- 9191:9191/tcp
1213
- 9191:9191/udp
1314
- 9192:9192/tcp
@@ -27,13 +28,13 @@ services:
2728
- 9199:9199/tcp
2829
- 9199:9199/udp
2930
volumes:
30-
- db:/app/hoprd-db
31+
- "db:/app/hoprd-db"
3132
security_opt:
32-
- seccomp:unconfined
33+
- "seccomp:unconfined"
3334
environment:
3435
RUST_LOG: info
3536
HOPRD_CONFIGURATION_FILE_PATH: /app/hoprd.cfg.yaml
36-
HOPRD_HOST: 127.0.0.1:9191
37+
HOPRD_HOST: "127.0.0.1:9191"
3738
HOPRD_SAFE_ADDRESS: 0x
3839
HOPRD_MODULE_ADDRESS: 0x
3940
HOPRD_HEARTBEAT_THRESHOLD: 60
@@ -46,11 +47,15 @@ services:
4647
resources:
4748
limits:
4849
memory: 2G
49-
image: node.hopr-testnet.public.dappnode.eth:1.0.0
5050
admin:
51-
image: europe-west3-docker.pkg.dev/hoprassociation/docker-images/hopr-admin:1.2.2
51+
# The actual image name will be set automatically by the sdk.
52+
# This tag only serves to pull the correct image during build.
53+
build:
54+
context: ./hopr-admin
55+
image: >-
56+
europe-west3-docker.pkg.dev/hoprassociation/docker-images/hopr-admin:2.1.6.1
5257
ports:
53-
- "3100:80"
58+
- "3100:4677"
5459
restart: unless-stopped
5560
deploy:
5661
resources:

hopr-admin/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM europe-west3-docker.pkg.dev/hoprassociation/docker-images/hopr-admin:2.1.6
2+
3+
ENTRYPOINT ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)