Skip to content

Commit

Permalink
Atlantis patch
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph committed Sep 3, 2024
1 parent 3807c9d commit 2cc8b73
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 50 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ defaults:

env:
RUSTFLAGS: --deny warnings
LANGUAGES: de fr es pt ru zh ja ko fil ar hi it nl

jobs:
docs:
Expand All @@ -30,43 +29,6 @@ jobs:

- uses: Swatinem/rust-cache@v2

- uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: latest

- name: Install mdbook-i18n-helpers
run: cargo install mdbook-i18n-helpers

- name: Install mdbook-linkcheck
run: |
mkdir -p mdbook-linkcheck
cd mdbook-linkcheck
wget https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/latest/download/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip
unzip mdbook-linkcheck.x86_64-unknown-linux-gnu.zip
chmod +x mdbook-linkcheck
pwd >> $GITHUB_PATH
- name: Build docs
run: mdbook build docs -d build

- name: Build all translations for docs
run: |
for lang in ${{ env.LANGUAGES }}; do
echo "::group::Building $lang translation"
MDBOOK_BOOK__LANGUAGE=$lang \
mdbook build docs -d build/$lang
mv docs/build/$lang/html docs/build/html/$lang
echo "::endgroup::"
done
- name: Deploy Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{secrets.GITHUB_TOKEN}}
publish_branch: gh-pages
publish_dir: docs/build/html

lint:
runs-on: ubuntu-latest

Expand Down
15 changes: 15 additions & 0 deletions atlantis.just
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
deploy-ordinals domain="agora.ephemera.gallery" remote="InscribingAtlantis/ord" branch="master" chain="main":
ssh root@{{domain}} 'mkdir -p deploy \
&& apt-get update --yes \
&& apt-get upgrade --yes \
&& apt-get install --yes git rsync'
rsync -avz deploy/checkout root@{{domain}}:deploy/checkout
ssh root@{{domain}} 'cd deploy && ./checkout {{branch}} {{remote}} {{chain}} {{domain}}'

deploy-preview domain="regtest.agora.ephemera.gallery" remote="InscribingAtlantis/ord" branch="master" chain="regtest":
ssh root@{{domain}} 'mkdir -p deploy \
&& apt-get update --yes \
&& apt-get upgrade --yes \
&& apt-get install --yes git rsync'
rsync -avz deploy/checkout root@{{domain}}:deploy/checkout
ssh root@{{domain}} 'cd deploy && ./checkout {{branch}} {{remote}} {{chain}} {{domain}}'
3 changes: 2 additions & 1 deletion deploy/bitcoind.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ ConfigurationDirectory=bitcoin
ConfigurationDirectoryMode=0710
ExecStart=/usr/local/bin/bitcoind \
-conf=/etc/bitcoin/bitcoin.conf \
-chain=${CHAIN}
-chain=${CHAIN} \
-nosettings
ExecStartPre=/bin/chgrp bitcoin /etc/bitcoin
Group=bitcoin
MemoryDenyWriteExecute=true
Expand Down
9 changes: 5 additions & 4 deletions deploy/ord.service
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ ExecStart=/usr/local/bin/ord \
--index-runes \
--index-sats \
server \
--acme-contact mailto:casey@rodarmor.com \
--csp-origin https://${CSP_ORIGIN} \
# --acme-contact mailto:info@inscribingatlantis.com \
# --acme-domain ${CSP_ORIGIN} \
--http \
--https \
--disable-json-api
# --https \
--http-port 8080
# --https-port 8443
Group=ord
LimitNOFILE=65536
MemoryDenyWriteExecute=true
Expand Down
15 changes: 8 additions & 7 deletions deploy/setup
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export DEBIAN_FRONTEND=noninteractive

touch ~/.hushlogin

hostnamectl set-hostname $DOMAIN
# hostnamectl set-hostname $DOMAIN

apt-get install --yes \
acl \
Expand All @@ -33,29 +33,30 @@ ufw default allow outgoing
ufw default deny incoming

ufw allow 8080
ufw allow 8443
ufw allow http
ufw allow https
ufw allow ssh

case $CHAIN in
main)
COOKIE_FILE_DIR=/var/lib/bitcoind
CSP_ORIGIN=ordinals.com
CSP_ORIGIN=ord.ephemera.gallery
ufw allow 8333
;;
regtest)
COOKIE_FILE_DIR=/var/lib/bitcoind/regtest
CSP_ORIGIN=regtest.ordinals.com
CSP_ORIGIN=regtest.ord.ephemera.gallery
ufw allow 18444
;;
signet)
COOKIE_FILE_DIR=/var/lib/bitcoind/signet
CSP_ORIGIN=signet.ordinals.com
CSP_ORIGIN=signet.ord.ephemera.gallery
ufw allow 38333
;;
test)
COOKIE_FILE_DIR=/var/lib/bitcoind/testnet3
CSP_ORIGIN=testnet.ordinals.com
CSP_ORIGIN=testnet.ord.ephemera.gallery
ufw allow 18333
;;
*)
Expand Down Expand Up @@ -131,7 +132,7 @@ systemctl daemon-reload
systemctl enable ord
systemctl restart ord

while ! curl --fail https://$DOMAIN/status > /dev/null; do
echo "Waiting for ord at https://$DOMAIN/status…"
while ! curl --fail http://$CSP_ORIGIN:8080/status > /dev/null; do
echo "Waiting for ord at https://$CSP_ORIGIN:8080/status…"
sleep 1
done
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mod atlantis

set positional-arguments

watch +args='test':
Expand Down

0 comments on commit 2cc8b73

Please sign in to comment.