readme added

This commit is contained in:
r8zavetr8v 2024-05-05 01:21:43 +03:00
parent a7719708fb
commit 658dc000b8
2 changed files with 54 additions and 1 deletions

View File

@ -16,7 +16,7 @@ d.net:
d.drop-net:
sudo docker network rm blockd-net
up:
up: d.build d.net
sudo docker compose up -d
.PHONY: run.local

53
backend/README.md Normal file
View File

@ -0,0 +1,53 @@
# NoNameBlockchainAccounting backend
## Build
### Locally
1. Install Go >= 1.22
``` sh
curl -LO https://get.golang.org/$(uname)/go_installer && \
chmod +x go_installer && \
./go_installer && \
rm go_installer
```
2. Install docker:
``` sh
output=$(which docker);
if [ -z "${output}" ]; then
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
sudo apt -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
fi
```
3. Build it!:
``` sh
make bin.build
```
4. Start the server:
``` sh
make d.net && \
sudo docker compose up blockd-db -d && \
make run.debug
```
Or
``` sh
make d.net && \
sudo docker compose up blockd-db -d && \
make run.local
```
### Docker
Just run
``` sh
make up
```