docs: improve comments
parent
e7afddee14
commit
e50b97c1cc
7
build.sh
7
build.sh
|
@ -1,6 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# remove previous build leftovers
|
||||||
rm -rf ./_site
|
rm -rf ./_site
|
||||||
|
|
||||||
|
# build, results are in ./_site
|
||||||
lume
|
lume
|
||||||
|
|
||||||
|
# put fonts in place
|
||||||
cp -r ./fonts ./_site/
|
cp -r ./fonts ./_site/
|
||||||
|
|
||||||
|
# clean up
|
||||||
rm -rf ./_site/README
|
rm -rf ./_site/README
|
||||||
|
|
11
deploy.sh
11
deploy.sh
|
@ -7,13 +7,16 @@ TAG="$1"
|
||||||
|
|
||||||
if [[ -z "$TAG" ]]; then
|
if [[ -z "$TAG" ]]; then
|
||||||
echo
|
echo
|
||||||
echo "Error: please provide a docker image tag as second argument, e.g.:"
|
echo "Error: please provide a docker image tag as first argument, e.g.:"
|
||||||
echo "./deploy.sh 1.0.0"
|
echo "./deploy.sh 1.0.0"
|
||||||
echo
|
echo
|
||||||
|
echo "You can check the currently deployed tag with"
|
||||||
|
echo "docker ps -a"
|
||||||
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Workaround for SSL: CERTIFICATE_VERIFY_FAILED error with docker-compose
|
# workaround for SSL: CERTIFICATE_VERIFY_FAILED error with docker-compose
|
||||||
if [ -z "$CURL_CA_BUNDLE" ]; then
|
if [ -z "$CURL_CA_BUNDLE" ]; then
|
||||||
if [ ! -f ~/Downloads/cacert-2021-10-26.pem ]; then
|
if [ ! -f ~/Downloads/cacert-2021-10-26.pem ]; then
|
||||||
curl https://curl.se/ca/cacert-2021-10-26.pem -o ~/Downloads/cacert-2021-10-26.pem
|
curl https://curl.se/ca/cacert-2021-10-26.pem -o ~/Downloads/cacert-2021-10-26.pem
|
||||||
|
@ -21,7 +24,7 @@ if [ -z "$CURL_CA_BUNDLE" ]; then
|
||||||
export CURL_CA_BUNDLE=~/Downloads/cacert-2021-10-26.pem
|
export CURL_CA_BUNDLE=~/Downloads/cacert-2021-10-26.pem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make sure we're using the local docker host first
|
# make sure we're using the local docker host for building our image
|
||||||
eval "$(triton env --unset)"
|
eval "$(triton env --unset)"
|
||||||
|
|
||||||
# build the image locally
|
# build the image locally
|
||||||
|
@ -32,7 +35,7 @@ docker login hub.greenbaum.cloud
|
||||||
docker push hub.greenbaum.cloud/miom.space:"$TAG"
|
docker push hub.greenbaum.cloud/miom.space:"$TAG"
|
||||||
|
|
||||||
# change DOCKER_HOST env var to remote docker host (Greenbaum's docker API)
|
# change DOCKER_HOST env var to remote docker host (Greenbaum's docker API)
|
||||||
eval "$(triton --profile lev-1-pub.solar env)"
|
eval "$(triton --account=pub_solar env)"
|
||||||
|
|
||||||
# use our tag for docker-compose
|
# use our tag for docker-compose
|
||||||
export DEPLOY_TAG="$TAG"
|
export DEPLOY_TAG="$TAG"
|
||||||
|
|
Loading…
Reference in New Issue