update web script

This commit is contained in:
timmypidashev
2023-11-09 13:59:15 -08:00
parent 7820806c26
commit 219d891c23
2 changed files with 48 additions and 1 deletions

View File

@@ -1,4 +1,12 @@
# CoreDNS base image
ARG ALPINE_VERSION=3.18
ARG GO_VERSION=1.21.3
ARG COREDNS_VERSION=v2.7.5
ARG COREDNS_VERSION=v1.11.1
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
RUN apk add -q --progress --update --no-cache git ca-certificates libcap2-bin
ENV GO111MODULE=on \
CGO_ENABLED=0
go install github.com/coredns/coredns/tree/v1.11.1

39
web
View File

@@ -10,6 +10,36 @@ export GIT_COMMIT=$(git rev-parse --short HEAD)
case $action in
help)
echo "timmypidashev.com | deploy script"
echo "Environments:"
echo " * dev"
echo " - development environment, builds include local https, debug mode, and hot reloading"
echo ""
echo " * prod"
echo " - production environment, builds include optimizations and are ready to roll"
echo ""
echo "Actions:"
echo " * build"
echo " - builds either the entire stack without cache or select container"
echo " - example: '{action} {environment}' or '{action} {container} {environment}'"
echo ""
echo " * run"
echo " - runs the entire stack with caching enabled"
echo " - example: '{action} {environment}'"
echo " - Note: individual containers cannot run on their own"
echo ""
echo " * bump"
echo " - bumps a containers version and the project version"
echo " - example: '{action} {container}'"
echo ""
echo " * push"
echo " - pushes an image to ghcr.io"
echo " - example: '{action} {container}"
echo " - Note: only production images are pushed"
exit 1
;;
build)
if [ "$environment" == "dev" ];
then
@@ -39,6 +69,15 @@ case $action in
exit 1
fi
;;
bump)
"bump pkg"
;;
push)
"push pkg"
;;
*)
echo "Invalid action. Use 'build', 'run', or 'push'!"
;;