Skip to content

Commit

Permalink
Merge pull request #7 from remcoros/minor-updates
Browse files Browse the repository at this point in the history
Minor updates
  • Loading branch information
remcoros authored Oct 5, 2024
2 parents c71a687 + b138f23 commit 60ebc4b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ RUN \

# patch environment.prod.ts for self-hosting
COPY patches/environment.prod.ts /build/public-pool-ui/src/environments/environment.prod.ts
COPY patches/public-pool-ui.patch /build/public-pool-ui/public-pool-ui.patch

RUN \
cd public-pool-ui && \
git apply public-pool-ui.patch && \
npm ci && \
npm run build

Expand Down
15 changes: 7 additions & 8 deletions instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Run the following command to switch to the "chrooted" environment, any system ch

/usr/lib/startos/scripts/chroot-and-upgrade

Install "socat":
Install "simpleproxy":

apt update && apt install socat -y
apt update && apt install simpleproxy -y

Paste the following, this will create a new systemd service responsible for port forwarding 3333 (Stratum):

```
cat > /lib/systemd/system/socat.stratum.service <<'EOL'
cat > /lib/systemd/system/simpleproxy.stratum.service <<'EOL'
[Unit]
Description=socat stratum forward
Description=simpleproxy stratum forward
Wants=podman.service
After=podman.service
Expand All @@ -28,7 +28,7 @@ Type=simple
Restart=always
RestartSec=3
ExecStartPre=/bin/bash -c "/bin/systemctl set-environment IP=$(ip route | grep default | awk '{print $9}' | head -1)"
ExecStart=/usr/bin/socat tcp-l:3333,fork,reuseaddr,su=nobody,bind=${IP} tcp:public-pool.embassy:3333
ExecStart=/usr/bin/simpleproxy -L ${IP}:3333 -R public-pool.embassy:3333
[Install]
WantedBy=multi-user.target
Expand All @@ -37,9 +37,8 @@ EOL

Enable the new systemd service:

systemctl enable socat.stratum
systemctl enable simpleproxy.stratum

Now exit the chroot environment. this will reboot StartOS!
**Do NOT close the SSH window manually, actually type `exit` and let it reboot.**
Now exit the chroot environment. this will reboot StartOS! **Do NOT close the SSH window manually, actually type `exit` and let it reboot.**

exit
4 changes: 3 additions & 1 deletion manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
id: public-pool
title: "Public Pool"
version: 0.2.2
version: 0.2.3
release-notes: |
* Enable ZeroMQ for new block notifications
* instructions: use simpleproxy instead of socat
* public-pool-ui: fix minor warnings
license: GPL
wrapper-repo: "https://github.com/remcoros/public-pool-startos"
upstream-repo: "https://github.com/benjamin-wilson/public-pool"
Expand Down
23 changes: 23 additions & 0 deletions patches/public-pool-ui.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/angular.json b/angular.json
index 467bf25..ca7193c 100644
--- a/angular.json
+++ b/angular.json
@@ -38,7 +38,10 @@
]
},
"scripts": [
- "node_modules/chart.js/dist/chart.js"
+ "node_modules/chart.js/dist/chart.umd.js"
+ ],
+ "allowedCommonJsDependencies": [
+ "moment"
]
},
"configurations": {
@@ -159,4 +162,4 @@
"cli": {
"analytics": false
}
-}
\ No newline at end of file
+}
2 changes: 1 addition & 1 deletion scripts/procedures/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export const migration: T.ExpectedExports.migration = compat.migrations
{ version: "0.2.2", type: "down" },
),
},
}, "0.2.2");
}, "0.2.3");

0 comments on commit 60ebc4b

Please sign in to comment.