about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAoi Koizumi <novaburst@kalli.st>2022-03-14 11:07:30 -0300
committerAoi Koizumi <novaburst@kalli.st>2022-03-14 11:07:30 -0300
commit7f62a3be71042366744463b97ff21f22d341d39e (patch)
treec11d982210114f48381deec53ff4a1bb05dc1820
parentf66dbadf21c3509c94e355174be367ddfc20ac18 (diff)
downloadzs-template-7f62a3be71042366744463b97ff21f22d341d39e.tar.gz
Removed docker crap, modified Makefile to be POSIX compliant
Signed-off-by: Aoi Koizumi <novaburst@kalli.st>
-rw-r--r--.dockerignore9
-rw-r--r--.drone.yml21
-rw-r--r--Dockerfile34
-rw-r--r--Makefile35
4 files changed, 11 insertions, 88 deletions
diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index abe986f..0000000
--- a/.dockerignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*~
-*.bak
-
-/.pub
-/.git
-/README.md
-/.drone.yml
-/.gitignore
-/.dockerignore
diff --git a/.drone.yml b/.drone.yml
deleted file mode 100644
index d1dcb17..0000000
--- a/.drone.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-kind: pipeline
-name: default
-
-steps:
-  - name: build-image-push
-    image: plugins/kaniko
-    settings:
-      registry: <register>
-      repo: <register>/<user>/<image>
-      tags: latest
-      username:
-        from_secret: <regsitry_username>
-      password:
-        from_secret: <registry_password>
-
-trigger:
-  branch:
-    - master
-  event:
-    - push
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 2b5da4b..0000000
--- a/Dockerfile
+++ /dev/null
@@ -1,34 +0,0 @@
-# Build
-FROM golang:alpine AS build
-
-ENV CGO_ENABLED=0
-
-RUN apk add --no-cache -U build-base git make
-
-RUN mkdir -p /src
-
-WORKDIR /src
-
-# Copy Makefile
-COPY Makefile ./
-
-# Install deps
-RUN make deps
-
-# Copy content
-COPY . .
-
-# Build the site
-RUN make build
-
-# Runtime
-FROM scratch
-
-WORKDIR /
-VOLUME /data
-
-COPY --from=build /go/bin/static /static
-COPY --from=build /src/.pub /data
-
-ENTRYPOINT ["/static"]
-CMD ["-r", "/data"]
diff --git a/Makefile b/Makefile
index 228a25c..4256ff3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,18 @@
--include environ.inc
-.PHONY: deps dev build install image release test clean
+all: generate
 
-GOCMD=go
-REGISTRY=<registry>
-IMAGE=<image>
 
-all: build
+clean:
+	rm -rf .pub/*
 
 deps:
-	@$(GOCMD) install git.mills.io/prologic/zs@latest
-	@$(GOCMD) install git.mills.io/prologic/static@latest
-
-dev : DEBUG=1
-dev : build
-	@zs watch
+	go install git.mills.io/prologic/static
+	go install git.mills.io/prologic/zs
 
-build:
-	@zs build
+generate:
+	zs build
 
-ifeq ($(PUBLISH), 1)
-image:
-	@docker build -t $(REGISTRY)/$(IMAGE) .
-	@docker push $(REGISTRY)/$(IMAGE)
-else
-image:
-	@docker build -t $(REGISTRY)/$(IMAGE) .
-endif
+serve:
+	static -r .pub/
 
-clean:
-	@git clean -f -d -X
+watch:
+	zs watch