diff --git a/kamal/Dockerfile b/kamal/Dockerfile new file mode 100644 index 0000000..83be479 --- /dev/null +++ b/kamal/Dockerfile @@ -0,0 +1 @@ +FROM caddy diff --git a/kamal/README.md b/kamal/README.md new file mode 100644 index 0000000..ac98fd5 --- /dev/null +++ b/kamal/README.md @@ -0,0 +1,20 @@ +``` +alias kamal='docker run -it --rm -v "${PWD}:/workdir" -v "${SSH_AUTH_SOCK}:/ssh-agent" -v /var/run/docker.sock:/var/run/docker.sock -e "SSH_AUTH_SOCK=/ssh-agent" ghcr.io/basecamp/kamal:latest' +``` + +```.env +KAMAL_REGISTRY_PASSWORD=* +``` + +``` +$ docker context create --docker=host=ssh://ubuntu@gamma.fogtype.com gamma +$ docker context use gamma +$ docker run --rm -d -p 127.0.0.1:5000:5000 --name registry registry +$ ssh -NL 5000:localhost:5000 ubuntu@gamma.fogtype.com +$ docker context use default +$ kamal deploy +``` + +TODO + +- [ ] Docker レジストリどうするか問題 diff --git a/kamal/config/deploy.yml b/kamal/config/deploy.yml new file mode 100644 index 0000000..d7391e9 --- /dev/null +++ b/kamal/config/deploy.yml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/kjellberg/mrsk/validate-with-json-schema/lib/mrsk/configuration/schema.yaml +service: kamal-example +image: caddy +servers: + - ubuntu@gamma.fogtype.com +registry: + server: localhost:5000 + username: _ + password: + - KAMAL_REGISTRY_PASSWORD