Makefile: Add build target for DigitalOcean cloud image

This commit is contained in:
Michael Mayer 2021-08-06 08:57:50 +02:00
parent 3b88c314d0
commit ddc19594ad
2 changed files with 8 additions and 5 deletions

View file

@ -1,4 +1,6 @@
.PHONY: build dev npm dep dep-go dep-js dep-list dep-tensorflow dep-upgrade dep-upgrade-js test install fmt upgrade start stop;
.PHONY: all build dev npm dep dep-go dep-js dep-list dep-tensorflow dep-upgrade dep-upgrade-js \
test test-js test-go install generate fmt fmt-go fmt-imports fmt-js upgrade start stop \
terminal root-terminal packer-digitalocean acceptance clean tidy;
.SILENT: ; # no need for @
.ONESHELL: ; # recipes execute in same shell
.NOTPARALLEL: ; # wait for target to finish
@ -201,6 +203,9 @@ docker-webdav:
docker pull --platform=arm64 golang:1
docker pull --platform=arm golang:1
scripts/docker-buildx.sh webdav linux/amd64,linux/arm64,linux/arm $(DOCKER_TAG)
packer-digitalocean:
$(info Buildinng DigitalOcean marketplace image...)
(cd ./docker/examples/cloud && packer build digitalocean.json)
lint-js:
(cd frontend && npm run lint)
fmt-js:

View file

@ -1,10 +1,10 @@
{
"variables": {
"do_token": "{{env `DIGITALOCEAN_TOKEN`}}",
"image_name": "photoprism-{{timestamp}}",
"image_name": "photoprism-ce-marketplace-{{timestamp}}",
"apt_packages": "software-properties-common apt-transport-https ca-certificates openssl ufw curl",
"application_name": "PhotoPrism",
"application_version": "{{timestamp}}"
"application_version": "latest"
},
"sensitive-variables": ["do_token"],
"builders": [
@ -55,8 +55,6 @@
{
"type": "shell",
"environment_vars": [
"application_name={{user `application_name`}}",
"application_version={{user `application_version`}}",
"DEBIAN_FRONTEND=noninteractive",
"LC_ALL=C",
"LANG=en_US.UTF-8",