*** THE REPO IS UNDER CONSTRUCTION - CHECK BACK SOON ***
Check all your public cryptocurrency wallets via a webpage (iPhone App coming soon).
Table of Contents
- OVERVIEW
- PREREQUISITES
- SOFTWARE STACK
- RUN
- CREATE BINARY
- STEP 1 - TEST
- STEP 2 - BUILD (DOCKER IMAGE VIA DOCKERFILE)
- STEP 3 - PUSH (TO DOCKERHUB)
- STEP 4 - DEPLOY (TO DOCKER)
- CONTINUOUS INTEGRATION & DEPLOYMENT
Documentation and Reference
- The crypto-wallet-status docker image on DockerHub
- crypto-miner-manager
- This repos github webpage built with concourse
Here is an overview of what we're going to do,
You will need the following go packages,
go get -u -v github.com/sirupsen/logrus
go get -u -v github.com/cweill/gotests/...
- DEVELOPMENT
- go
- gotests
- OPERATIONS
- concourse/fly (optional)
- docker
- SERVICES
Where,
- GUI golang net/http package and ReactJS
- Routing & REST API framework golang gorilla/mux package
- Backend golang
- Database N/A
To run.sh,
cd crypto-wallet-status-code
go run main.go
As a placeholder, every 2 seconds it will print,
INFO[0000] Let's Start this!
Hello everyone, count is: 1
Hello everyone, count is: 2
Hello everyone, count is: 3
etc...
To create-binary.sh,
cd crypto-wallet-status-code/bin
go build -o crypto-wallet-status ../main.go
./crypto-wallet-status
This binary will not be used during a docker build since it creates it's own.
To create unit _test
files,
cd crypto-wallet-status-code
gotests -w -all main.go
To run unit-tests.sh,
go test -cover ./... | tee test/test_coverage.txt
cat test/test_coverage.txt
To build.sh with a Dockerfile,
cd crypto-wallet-status-code
docker build -f build/Dockerfile -t jeffdecola/crypto-wallet-status .
You can check and test this docker image,
docker images jeffdecola/crypto-wallet-status:latest
docker run --name crypto-wallet-status -dit jeffdecola/crypto-wallet-status
docker exec -i -t crypto-wallet-status /bin/bash
docker logs crypto-wallet-status
docker rm -f crypto-wallet-status
In stage 1, rather than copy a binary into a docker image (because that can cause issues), the Dockerfile will build the binary in the docker image,
FROM golang:alpine AS builder
RUN go get -d -v
RUN go build -o /go/bin/crypto-wallet-status main.go
In stage 2, the Dockerfile will copy the binary created in
stage 1 and place into a smaller docker base image based
on alpine
, which is around 13MB.
You must be logged in to DockerHub,
docker login
To push.sh,
docker push jeffdecola/crypto-wallet-status
Check the crypto-wallet-status docker image at DockerHub.
To deploy.sh,
cd crypto-wallet-status-code
docker run --name crypto-wallet-status -dit jeffdecola/crypto-wallet-status
docker exec -i -t crypto-wallet-status /bin/bash
docker logs crypto-wallet-status
docker rm -f crypto-wallet-status
Refer to ci-README.md on how I automated the above steps.