mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feature/deploy linux (#1206)
* chore(deploy): remove devbox configuration * feat(taskfiles): add mount and platform specific start commands for IPFS
This commit is contained in:
parent
59b561d2d9
commit
4d6a8628af
@ -17,9 +17,14 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- gum spin --spinner dot --title "Build Hway Single Target ({{.OS}}/{{.ARCH}})..." -- goreleaser build --snapshot --clean --single-target --id hway -o {{.BIN_DIR}}/hway
|
- gum spin --spinner dot --title "Build Hway Single Target ({{.OS}}/{{.ARCH}})..." -- goreleaser build --snapshot --clean --single-target --id hway -o {{.BIN_DIR}}/hway
|
||||||
|
|
||||||
|
install:
|
||||||
|
desc: Install the hway binary
|
||||||
|
silent: true
|
||||||
|
cmds:
|
||||||
|
- gum spin --spinner dot --title "Install Hway Single Target ({{.OS}}/{{.ARCH}})..." -- make install-hway
|
||||||
|
|
||||||
start:
|
start:
|
||||||
desc: Start the hway daemon
|
desc: Start the hway daemon
|
||||||
silent: true
|
silent: true
|
||||||
deps: [build]
|
|
||||||
cmds:
|
cmds:
|
||||||
- "{{.BINARY}}"
|
- "{{.BINARY}}"
|
||||||
|
@ -29,9 +29,22 @@ tasks:
|
|||||||
- ipfs config --json Peering.Peers {{.PEERS}}
|
- ipfs config --json Peering.Peers {{.PEERS}}
|
||||||
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
|
- ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
|
||||||
|
|
||||||
start:
|
mount:
|
||||||
desc: Start the ipfs daemon
|
desc: Mount the ipfs,ipns directories
|
||||||
silent: true
|
silent: true
|
||||||
deps: [init]
|
platforms:
|
||||||
cmds:
|
- linux
|
||||||
- ipfs daemon
|
cmds:
|
||||||
|
- ipfs config --json Mounts.FuseAllowOther true
|
||||||
|
|
||||||
|
start:
|
||||||
|
desc: Start the ipfs daemon
|
||||||
|
silent: true
|
||||||
|
cmds:
|
||||||
|
- cmd: ipfs daemon --migrate
|
||||||
|
platforms:
|
||||||
|
- darwin
|
||||||
|
- task: mount
|
||||||
|
- cmd: ipfs daemon --mount
|
||||||
|
platforms:
|
||||||
|
- linux
|
||||||
|
@ -8,9 +8,6 @@ vars:
|
|||||||
sh: git rev-parse HEAD
|
sh: git rev-parse HEAD
|
||||||
VERSION:
|
VERSION:
|
||||||
sh: git describe --tags --always
|
sh: git describe --tags --always
|
||||||
DOPPLER_TOKEN:
|
|
||||||
sh: skate get DOPPLER_NETWORK
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
build:
|
build:
|
||||||
desc: Build the sonrd binary
|
desc: Build the sonrd binary
|
||||||
@ -45,4 +42,3 @@ tasks:
|
|||||||
desc: Start the sonr node
|
desc: Start the sonr node
|
||||||
cmds:
|
cmds:
|
||||||
- sh scripts/test_dop_node.sh
|
- sh scripts/test_dop_node.sh
|
||||||
|
|
||||||
|
67
Taskfile.yml
67
Taskfile.yml
@ -40,7 +40,13 @@ tasks:
|
|||||||
desc: Install go dependencies
|
desc: Install go dependencies
|
||||||
silent: true
|
silent: true
|
||||||
vars:
|
vars:
|
||||||
DEPS: ["github.com/apple/pkl-go/cmd/pkl-gen-go@latest", "github.com/sqlc-dev/sqlc/cmd/sqlc@latest", "github.com/goreleaser/goreleaser/v2@latest","github.com/a-h/templ/cmd/templ@latest"]
|
DEPS:
|
||||||
|
[
|
||||||
|
"github.com/apple/pkl-go/cmd/pkl-gen-go@latest",
|
||||||
|
"github.com/sqlc-dev/sqlc/cmd/sqlc@latest",
|
||||||
|
"github.com/goreleaser/goreleaser/v2@latest",
|
||||||
|
"github.com/a-h/templ/cmd/templ@latest",
|
||||||
|
]
|
||||||
cmds:
|
cmds:
|
||||||
- for: { var: DEPS }
|
- for: { var: DEPS }
|
||||||
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
|
cmd: gum spin --spinner dot --title "Installing go dependencies..." -- go install {{.ITEM}}
|
||||||
@ -70,3 +76,62 @@ tasks:
|
|||||||
desc: Generate templ files
|
desc: Generate templ files
|
||||||
silent: true
|
silent: true
|
||||||
cmd: gum spin --spinner dot --title "Generating Templ..." -- templ generate
|
cmd: gum spin --spinner dot --title "Generating Templ..." -- templ generate
|
||||||
|
|
||||||
|
start:
|
||||||
|
desc: Start the Network
|
||||||
|
silent: true
|
||||||
|
cmds:
|
||||||
|
- task: postgres:reset
|
||||||
|
- task: ipfs:init
|
||||||
|
- task: ipfs:mount
|
||||||
|
- task: sonrd:install
|
||||||
|
- task: hway:build
|
||||||
|
- task: procs-up
|
||||||
|
|
||||||
|
status:
|
||||||
|
desc: Check the status of the Network
|
||||||
|
silent: true
|
||||||
|
cmds:
|
||||||
|
- task: procs-attach
|
||||||
|
|
||||||
|
stop:
|
||||||
|
desc: Stop the Network
|
||||||
|
silent: true
|
||||||
|
cmds:
|
||||||
|
- task: procs-down
|
||||||
|
|
||||||
|
procs-up:
|
||||||
|
internal: true
|
||||||
|
dir: "deploy"
|
||||||
|
cmds:
|
||||||
|
- cmd: process-compose up
|
||||||
|
platforms:
|
||||||
|
- darwin
|
||||||
|
|
||||||
|
- cmd: process-compose up --use-uds --unix-socket /tmp/sonr-network.sock -D
|
||||||
|
platforms:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
procs-down:
|
||||||
|
internal: true
|
||||||
|
dir: "deploy"
|
||||||
|
cmds:
|
||||||
|
- cmd: process-compose down
|
||||||
|
platforms:
|
||||||
|
- darwin
|
||||||
|
|
||||||
|
- cmd: process-compose down --use-uds --unix-socket /tmp/sonr-network.sock
|
||||||
|
platforms:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
procs-attach:
|
||||||
|
internal: true
|
||||||
|
dir: "deploy"
|
||||||
|
cmds:
|
||||||
|
- cmd: process-compose attach --use-uds --unix-socket /tmp/sonr-network.sock
|
||||||
|
platforms:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
- cmd: process-compose attach
|
||||||
|
platforms:
|
||||||
|
- darwin
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
|
|
||||||
"packages": [
|
|
||||||
"tigerbeetle@latest",
|
|
||||||
"ipfs@latest"
|
|
||||||
],
|
|
||||||
"shell": {
|
|
||||||
"scripts": {
|
|
||||||
"init": [],
|
|
||||||
"start": [
|
|
||||||
"devbox services up"
|
|
||||||
],
|
|
||||||
"stop": [
|
|
||||||
"devbox services down"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +1,23 @@
|
|||||||
version: "0.5"
|
version: "0.5"
|
||||||
|
|
||||||
environment:
|
|
||||||
- "PC_DISABLE_TUI=true"
|
|
||||||
log_location: "./tmp/logs"
|
|
||||||
log_level: "debug"
|
|
||||||
|
|
||||||
processes:
|
processes:
|
||||||
IPFS:
|
IPFS:
|
||||||
namespace: testnet
|
namespace: testnet
|
||||||
command: "task ipfs:start"
|
command: "ipfs daemon --mount"
|
||||||
availability:
|
ready_log_line: "Daemon is ready"
|
||||||
restart: "always"
|
|
||||||
|
|
||||||
Sonr:
|
Sonr:
|
||||||
namespace: testnet
|
namespace: testnet
|
||||||
command: "task sonrd:start"
|
command: "task sonrd:start"
|
||||||
depends_on:
|
depends_on:
|
||||||
ipfs:
|
IPFS:
|
||||||
condition: process_completed
|
condition: process_log_ready
|
||||||
environment:
|
|
||||||
- "SONR_NETWORK=testnet"
|
|
||||||
|
|
||||||
Hway:
|
Hway:
|
||||||
namespace: testnet
|
namespace: testnet
|
||||||
command: "hway"
|
command: "hway"
|
||||||
depends_on:
|
depends_on:
|
||||||
sonr:
|
IPFS:
|
||||||
condition: process_completed_successfully
|
condition: process_log_ready
|
||||||
|
Sonr:
|
||||||
|
condition: process_started
|
||||||
|
Loading…
x
Reference in New Issue
Block a user