Skip to content

Commit

Permalink
Merge branch 'main' into feat/new-2
Browse files Browse the repository at this point in the history
  • Loading branch information
vaultec81 committed Nov 23, 2023
2 parents 91df24c + 5103b8c commit 8a7b84b
Show file tree
Hide file tree
Showing 7 changed files with 25,941 additions and 9 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ci

on:
push:
branches:
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{vars.DOCKERHUB_IMAGE}}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
node_modules
*-lock.json
coverage
logs
dist
.env
inventory.yml
data
contracts/example.js
seed-backup
seed-backup
.DS_Store
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,33 @@

< fill in >


## Installation

### Docker compose

Install [Docker](https://docs.docker.com/get-docker/) and [Docker compose](https://docs.docker.com/compose/install/).

Download the Docker compose file [here](https://raw.githubusercontent.com/vsc-eco/vsc-node/main/deploy/docker-compose/docker-compose.yml).

Assure that the Docker user has write permissions in the directory you startup the Docker compose file.

Create an `.env` file according to the schema specified in the [.env.example](https://raw.githubusercontent.com/vsc-eco/vsc-node/main/.env.example) file and put it next to the docker compose file.

``` txt
# Fill these in with your hive account details
HIVE_ACCOUNT=
HIVE_ACCOUNT_POSTING=
HIVE_ACCOUNT_ACTIVE=
# Leave untouched unless instructed otherwise.
MULTISIG_ACCOUNT=vsc.beta
MULTISIG_ANTI_HACK=did:key:z6Mkj5mKz5EBnqqsyV2qBohYFuvTXpCuxzNMGSpa1FJRstze
MULTISIG_ANTI_HACK_KEY=
```

Launch via `docker-compose up -d`.

### Ansible

Ansible is a [deployment automation](https://opensource.com/resources/what-ansible) tool.
Expand Down Expand Up @@ -42,5 +66,3 @@ On a high level the script
1. register the update.sh script as a crown job to automatically keep the node up to date

The bare_metal installation is currently not completed.


61 changes: 61 additions & 0 deletions deploy/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: "3.3"

services:
vsc-node: # name of the service
image: vaultec/vsc-node:latest
container_name: vsc-node # what to label the container for docker ps
restart: always # restart if failed, until we stop it ourselves
#external_links:
#- mongo
depends_on:
- ipfs
networks:
- vsc-node
ports:
- 1337:1337
environment:
IPFS_HOST: http://ipfs:5001
MONGO_HOST: mongo:27017
volumes:
- node-modules-store:/home/github/app/node_modules
- ./data/vsc-node:/root/.vsc-node
- ./seed-backup.json:/root/.vsc-seed-backup.json
- ./.git/refs/heads/main:/root/git_commit

mongo:
container_name: mongo_vsc
image: mongo:4.4.18
restart: always
ports:
- 127.0.0.1:27021:27017
networks:
- vsc-node
volumes:
- ./data/vsc-db:/data/db

ipfs:
container_name: ipfs-vsc
image: ipfs/kubo:v0.18.1
restart: always
command:
- daemon
- --enable-pubsub-experiment
- --init-profile
- server
networks:
- vsc-node
ports:
- "4001:4001"
- "127.0.0.1:5001:5001"
environment:
IPFS_PATH: /etc/ipfs
volumes:
- ./data/ipfs:/etc/ipfs

volumes:
node-modules-store: {}
mongodb: {}

networks:
vsc-node:
driver: bridge
Loading

0 comments on commit 8a7b84b

Please sign in to comment.