Preparation for CI CD

This commit is contained in:
Vivek Teega 2024-07-03 21:29:30 +05:30
parent 95393696ed
commit 24f8a637d2
5 changed files with 3 additions and 36 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.env .env
playbook.yml

View File

@ -1,9 +0,0 @@
FROM ubuntu:22.04
COPY ./deb-files/backend-flo_0.15.1.1-satoshilabs-1_amd64.deb /opt/backend.deb
RUN apt update && apt install -y /opt/backend.deb
WORKDIR /opt/coins/nodes/flo
RUN sed -i 's/daemon=1/daemon=0/' /opt/coins/nodes/flo/flo.conf
ENTRYPOINT ["/opt/coins/nodes/flo/bin/flod", "-datadir=/opt/coins/data/flo/backend", "-conf=/opt/coins/nodes/flo/flo.conf", "-pid=/run/flo/flo.pid"]

View File

@ -1,8 +0,0 @@
FROM ubuntu:22.04
COPY ./deb-files/blockbook-flo_0.4.0_amd64.deb /opt/blockbook.deb
RUN apt update && apt install -y /opt/blockbook.deb
WORKDIR /opt/coins/blockbook/flo
ENTRYPOINT ["/opt/coins/blockbook/flo/bin/blockbook", "-blockchaincfg=/opt/coins/blockbook/flo/config/blockchaincfg.json", "-datadir=/opt/coins/data/flo/blockbook/db", "-sync", "-internal=:9066", "-public=:9166", "-certfile=/opt/coins/blockbook/flo/cert/blockbook", "-explorer=", "-log_dir=/opt/coins/blockbook/flo/logs", "-dbcache=1073741824"]

View File

@ -6,6 +6,7 @@
- [ ] Think of how Blockbook container will detect the status of backend container - [ ] Think of how Blockbook container will detect the status of backend container
- [ ] Figure out if multiple volume path need to be mounted - [ ] Figure out if multiple volume path need to be mounted
- [ ] See if creating a new network for both the containers will be a good option. - [ ] See if creating a new network for both the containers will be a good option.
---
- [X] [Unable to build frontend separately since having backend package installed is a dependency] Create separate images for both backend and blockbook. - [X] [Unable to build frontend separately since having backend package installed is a dependency] Create separate images for both backend and blockbook.
- [X] Attach the same volume to both the running containers of the images. - [X] Attach the same volume to both the running containers of the images.

View File

@ -1,18 +0,0 @@
sudo docker volume create blockbook
sudo docker network create blockbook
# Run backend in daemon mode for production
docker run -d --name blockbook-backend --mount source=blockbook,target=/opt -p 38366:38366 -p 8066:8066 --network=blockbook vivekteega/blockbook:1.0.0 backend
# Run backend in daemon mode for production with Bootstrap
docker run -d --name blockbook-backend --mount source=blockbook,target=/opt -p 38366:38366 -p 8066:8066 --network=blockbook --env BOOTSTRAP_URL=https://bootstrap.ranchimall.net/blockbook-flo-backend1.tar.gz vivekteega/blockbook:1.0.0 backend
# Find the IP address of blockbook-backend container
ip_backend_container
# Run frontend in daemon mode for production
docker run -d --name blockbook-frontend --mount source=blockbook,target=/opt -p 9166:9166 -p 9066:9066 --network=blockbook vivekteega/blockbook:1.0.0 frontend $ip_backend_container
# Run frontend in daemon mode for production with Bootstrap
docker run -d --name blockbook-frontend --mount source=blockbook,target=/opt -p 9166:9166 -p 9066:9066 --network=blockbook --env BOOTSTRAP_URL=https://bootstrap.ranchimall.net/blockbook-flo-frontend.tar.gz vivekteega/blockbook:1.0.0 frontend $ip_backend_container