Compare commits
2
Commits
904d14b64c
...
b87aa0aa17
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b87aa0aa17 | ||
|
|
64f11e4960 |
@@ -156,8 +156,10 @@ PRODUCTION_BUILD_DIR = ./bin/${PRODUCTION_GOOS}_${PRODUCTION_GOARCH}
|
||||
|
||||
production_target = ${PRODUCTION_SSH_USER}@${PRODUCTION_HOST}
|
||||
production_ssh_options = -p ${PRODUCTION_SSH_PORT}
|
||||
production_scp_options = -P ${PRODUCTION_SSH_PORT}
|
||||
ifneq ($(strip ${PRODUCTION_SSH_IDENTITY_FILE}),)
|
||||
production_ssh_options += -i ${PRODUCTION_SSH_IDENTITY_FILE}
|
||||
production_scp_options += -i ${PRODUCTION_SSH_IDENTITY_FILE}
|
||||
endif
|
||||
|
||||
.PHONY: production/check-config
|
||||
@@ -179,7 +181,7 @@ production/connect: production/check-config
|
||||
production/provision: production/check-config
|
||||
@test -f ./remote/setup/.env || { echo 'Copy remote/setup/.env.example to remote/setup/.env and configure it first' >&2; exit 1; }
|
||||
@permissions=$$(stat -c '%a' ./remote/setup/.env); (( (8#$$permissions & 077) == 0 )) || { echo 'remote/setup/.env must have mode 0600' >&2; exit 1; }
|
||||
rsync -P -e "ssh ${production_ssh_options}" ./remote/setup/provision-server.sh ${production_target}:/tmp/gardomatic-provision-server.sh
|
||||
scp ${production_scp_options} ./remote/setup/provision-server.sh ${production_target}:/tmp/gardomatic-provision-server.sh
|
||||
ssh ${production_ssh_options} ${production_target} 'status=0; chmod 700 /tmp/gardomatic-provision-server.sh && /tmp/gardomatic-provision-server.sh --env-file - || status=$$?; rm -f /tmp/gardomatic-provision-server.sh; exit $$status' < ./remote/setup/.env
|
||||
|
||||
## production/deploy: deploy API and web to production
|
||||
|
||||
@@ -350,7 +350,7 @@ internal/
|
||||
lib/
|
||||
client/ typisierter Go-Client für die JSON-API
|
||||
doc/ Planung und weiterführende Dokumentation
|
||||
remote/ Produktionsbeispiele für systemd und Caddy
|
||||
remote/ Produktionsbeispiele für systemd
|
||||
request/ manuelle HTTP-Beispielanfragen
|
||||
```
|
||||
|
||||
@@ -383,7 +383,7 @@ verwenden. Beiträge im Namen eines Unternehmens müssen vorab abgestimmt werden
|
||||
## Deployment
|
||||
|
||||
Der `Dockerfile` kann Images für API und Web erzeugen. Unter `remote/production`
|
||||
liegen außerdem Beispielkonfigurationen für systemd und Caddy. Die
|
||||
liegen außerdem Beispielkonfigurationen für systemd. Die
|
||||
`production/*`-Ziele im `Makefile` sind auf die vorhandene Gardomatic-Infrastruktur
|
||||
zugeschnitten, enthalten einen fest konfigurierten Zielhost und führen Migrationen
|
||||
sowie Dienstneustarts aus. Sie sind keine allgemeine Deployment-Anleitung und
|
||||
|
||||
Reference in New Issue
Block a user