Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1918c8d9c7 | ||
|
|
381254ed4d | ||
|
|
a11a6ef59f | ||
|
|
086e4682d4 | ||
|
|
bf22dc2511 | ||
|
|
6585c9ffcb | ||
|
|
13585491a4 | ||
|
|
72a629e88b | ||
|
|
f57bec560a | ||
|
|
1f49486870 | ||
|
|
06f7cfbfad | ||
|
|
e1b92278a5 | ||
|
|
b3c50f4694 | ||
|
|
7dd05ac92f | ||
|
|
800a82045d | ||
|
|
c96dec4692 | ||
|
|
417c126777 | ||
|
|
1205192e8a | ||
|
|
aa2f547856 | ||
|
|
57e72de021 | ||
|
|
15ae2b8221 | ||
|
|
f895b7979d | ||
|
|
bec7f067bc | ||
|
|
e50a3e80e9 | ||
|
|
afb0b931c5 | ||
|
|
fb1568259b | ||
|
|
c1049bf69d | ||
|
|
b05fe5b302 | ||
|
|
505eda01a3 | ||
|
|
d329cbd6ef | ||
|
|
1e4dcaaf3b | ||
|
|
4c5ec099d0 | ||
|
|
b2ec499590 | ||
|
|
75b532cda0 | ||
|
|
68686efe03 | ||
|
|
208e1d9535 | ||
|
|
f2a0f22f4a | ||
|
|
dea124933e | ||
|
|
51a46fe5a0 | ||
|
|
f6fb8922af | ||
|
|
bd7fbc3003 | ||
|
|
8b957c7cf7 | ||
|
|
f1de62f01e | ||
|
|
64dc8e18e7 | ||
|
|
b262977117 | ||
|
|
3762f2b465 | ||
|
|
9f7a9812ed |
@@ -17,9 +17,15 @@ COPY assets/favicon /usr/share/nginx/html/assets/favicon
|
||||
COPY assets/video /usr/share/nginx/html/assets/video
|
||||
|
||||
# Le immagini e i font citati da index.html e style.css prendono ?v=<versione>, come quelli caricati dal codice.
|
||||
# Alla versione si aggiunge l'impronta del contenuto di assets/: uno sfondo rifatto senza cambiare versione (in
|
||||
# locale, fra un bump e l'altro) ha un indirizzo nuovo, e il browser non tiene quello vecchio dalla cache lunga.
|
||||
RUN cd /usr/share/nginx/html \
|
||||
&& V=$(sed -n "s/^export const VERSION = '\([0-9.]*\)';$/\1/p" src/version.js) \
|
||||
&& test -n "$V" \
|
||||
&& H=$(find assets -type f -exec md5sum {} + | sort -k2 | md5sum | cut -c1-8) \
|
||||
&& sed -i -E 's#v=\$\{VERSION\}#v=${VERSION}-'"$H"'#' src/version.js \
|
||||
&& grep -q "VERSION}-$H" src/version.js \
|
||||
&& V="$V-$H" \
|
||||
&& sed -i -E "s#url\((assets/[^)]*)\)#url(\1?v=$V)#g" style.css \
|
||||
&& sed -i -E "s#src=\"(assets/[^\"]*)\"#src=\"\1?v=$V\"#g" index.html \
|
||||
&& grep -q "?v=$V" style.css && grep -q "?v=$V" index.html
|
||||
|
||||
@@ -24,7 +24,7 @@ CROP ?=
|
||||
COLORS ?= 64
|
||||
|
||||
.PHONY: help serve open test browser verify check-public bump voci voci-elenco sfondi sfondi-genera sfondi-confronto background character \
|
||||
build up down restart logs ps shell image-size deploy deploy-logs clean distclean
|
||||
build up down restart logs ps shell image-size deploy deploy-vps deploy-logs clean distclean
|
||||
|
||||
## ------------------------------------------------------------ sviluppo
|
||||
|
||||
@@ -124,6 +124,8 @@ image-size: ## Dimensione dell'immagine
|
||||
# Host e indirizzo stanno in deploy.local.mk, fuori da git, per esempio:
|
||||
# DEPLOY_HOST = root@mio-server
|
||||
# DEPLOY_URL = https://gioco.esempio
|
||||
# VPS_HOST = mio-vps (facoltativo: una seconda copia, con make deploy-vps)
|
||||
# VPS_DIR = docker/leggenda-regolo
|
||||
-include deploy.local.mk
|
||||
DEPLOY_DIR ?= /root/leggenda-regolo
|
||||
DEPLOY_TMP := $(shell mktemp -d -u /tmp/regolo-deploy.XXXXXX)
|
||||
@@ -151,6 +153,16 @@ deploy: ## Pubblica l'ultimo commit: test, immagine costruita e provata qui, spe
|
||||
xargs -r -I{} docker image rm -f $(IMAGE):{} >/dev/null
|
||||
@echo "→ $(DEPLOY_URL) ($$(git log -1 --format='%h %s'))"
|
||||
|
||||
deploy-vps: ## Spedisce al VPS (VPS_HOST, VPS_DIR in deploy.local.mk) l'immagine dell'ultimo commit già provata da make deploy
|
||||
@test -n "$(VPS_HOST)" -a -n "$(VPS_DIR)" || { echo "mancano VPS_HOST e VPS_DIR: scrivili in deploy.local.mk"; exit 2; }
|
||||
@docker image inspect $(IMAGE):$$(git rev-parse --short HEAD) >/dev/null 2>&1 || \
|
||||
{ echo "manca l'immagine dell'ultimo commit ($$(git rev-parse --short HEAD)): prima make deploy"; exit 1; }
|
||||
ssh $(VPS_HOST) 'mkdir -p $(VPS_DIR)'
|
||||
git show HEAD:docker-compose.homeserver.yml | ssh $(VPS_HOST) 'cat > $(VPS_DIR)/docker-compose.yml'
|
||||
docker save $(IMAGE):$$(git rev-parse --short HEAD) $(IMAGE):latest | gzip | \
|
||||
ssh $(VPS_HOST) 'gunzip | docker load -q && cd $(VPS_DIR) && docker compose up -d && docker image prune -f >/dev/null'
|
||||
@ssh $(VPS_HOST) "docker exec $(IMAGE) grep -o \"VERSION = '[^']*'\" /usr/share/nginx/html/src/version.js" | sed 's/^/→ $(VPS_HOST): /'
|
||||
|
||||
deploy-logs: ## Log del container sul server di deploy
|
||||
@test -n "$(DEPLOY_HOST)" || { echo "manca DEPLOY_HOST: scrivilo in deploy.local.mk"; exit 2; }
|
||||
ssh $(DEPLOY_HOST) 'cd $(DEPLOY_DIR) && docker compose logs -f --tail 50'
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"image": "andrea-basket.png",
|
||||
"height": 120,
|
||||
"frames": {
|
||||
"hold": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 51,
|
||||
"h": 120,
|
||||
"ax": 19.1,
|
||||
"ay": 120
|
||||
},
|
||||
"load": {
|
||||
"x": 53,
|
||||
"y": 0,
|
||||
"w": 62,
|
||||
"h": 106,
|
||||
"ax": 32.9,
|
||||
"ay": 106
|
||||
},
|
||||
"shoot": {
|
||||
"x": 117,
|
||||
"y": 0,
|
||||
"w": 69,
|
||||
"h": 124,
|
||||
"ax": 30.0,
|
||||
"ay": 124
|
||||
},
|
||||
"cheer": {
|
||||
"x": 188,
|
||||
"y": 0,
|
||||
"w": 59,
|
||||
"h": 118,
|
||||
"ax": 26.5,
|
||||
"ay": 118
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 47 KiB |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"image": "andrea-pesca.png",
|
||||
"height": 120,
|
||||
"frames": {
|
||||
"hold": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 101,
|
||||
"h": 120,
|
||||
"ax": 31.2,
|
||||
"ay": 120
|
||||
},
|
||||
"cast": {
|
||||
"x": 103,
|
||||
"y": 0,
|
||||
"w": 145,
|
||||
"h": 89,
|
||||
"ax": 56.1,
|
||||
"ay": 89
|
||||
},
|
||||
"reel": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 102,
|
||||
"h": 107,
|
||||
"ax": 32.5,
|
||||
"ay": 107
|
||||
},
|
||||
"show": {
|
||||
"x": 354,
|
||||
"y": 0,
|
||||
"w": 129,
|
||||
"h": 113,
|
||||
"ax": 87.9,
|
||||
"ay": 113
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"image": "bertovo.png",
|
||||
"height": 120,
|
||||
"frames": {
|
||||
"stand": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 53,
|
||||
"h": 120,
|
||||
"ax": 27.4,
|
||||
"ay": 120
|
||||
},
|
||||
"blink": {
|
||||
"x": 55,
|
||||
"y": 0,
|
||||
"w": 52,
|
||||
"h": 121,
|
||||
"ax": 26.1,
|
||||
"ay": 121
|
||||
},
|
||||
"talk": {
|
||||
"x": 109,
|
||||
"y": 0,
|
||||
"w": 79,
|
||||
"h": 121,
|
||||
"ax": 31.3,
|
||||
"ay": 121
|
||||
},
|
||||
"explain": {
|
||||
"x": 190,
|
||||
"y": 0,
|
||||
"w": 58,
|
||||
"h": 121,
|
||||
"ax": 30.2,
|
||||
"ay": 121
|
||||
},
|
||||
"laugh": {
|
||||
"x": 250,
|
||||
"y": 0,
|
||||
"w": 54,
|
||||
"h": 122,
|
||||
"ax": 28.6,
|
||||
"ay": 122
|
||||
},
|
||||
"chalk": {
|
||||
"x": 306,
|
||||
"y": 0,
|
||||
"w": 55,
|
||||
"h": 121,
|
||||
"ax": 25.0,
|
||||
"ay": 121
|
||||
},
|
||||
"shrug": {
|
||||
"x": 363,
|
||||
"y": 0,
|
||||
"w": 91,
|
||||
"h": 122,
|
||||
"ax": 45.4,
|
||||
"ay": 122
|
||||
},
|
||||
"cheer": {
|
||||
"x": 456,
|
||||
"y": 0,
|
||||
"w": 58,
|
||||
"h": 125,
|
||||
"ax": 31.0,
|
||||
"ay": 125
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 95 KiB |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"image": "pescatori.png",
|
||||
"height": 110,
|
||||
"frames": {
|
||||
"work": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 170,
|
||||
"h": 110,
|
||||
"ax": 84.0,
|
||||
"ay": 110
|
||||
},
|
||||
"talk": {
|
||||
"x": 172,
|
||||
"y": 0,
|
||||
"w": 166,
|
||||
"h": 112,
|
||||
"ax": 79.2,
|
||||
"ay": 112
|
||||
},
|
||||
"laugh": {
|
||||
"x": 340,
|
||||
"y": 0,
|
||||
"w": 164,
|
||||
"h": 113,
|
||||
"ax": 79.7,
|
||||
"ay": 113
|
||||
},
|
||||
"proud": {
|
||||
"x": 506,
|
||||
"y": 0,
|
||||
"w": 166,
|
||||
"h": 121,
|
||||
"ax": 80.7,
|
||||
"ay": 121
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 276 KiB |
|
After Width: | Height: | Size: 526 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 399 KiB |
|
After Width: | Height: | Size: 271 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 284 KiB |
|
After Width: | Height: | Size: 175 KiB |
|
After Width: | Height: | Size: 416 KiB |
|
After Width: | Height: | Size: 475 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 456 KiB |
|
After Width: | Height: | Size: 280 KiB |
|
After Width: | Height: | Size: 233 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 235 KiB |
|
After Width: | Height: | Size: 257 KiB |