From 0fa1ac35b5dc04f248bf8fd4be3517ab8f3793d2 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Sun, 30 Jun 2024 13:23:58 +0900 Subject: [PATCH] create kamal --- kamal/.gitignore | 1 + kamal/README.md | 15 +++++++-------- kamal/config/deploy.yml | 11 +++++++---- 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 kamal/.gitignore diff --git a/kamal/.gitignore b/kamal/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/kamal/.gitignore @@ -0,0 +1 @@ +.env diff --git a/kamal/README.md b/kamal/README.md index ac98fd5..5b9665d 100644 --- a/kamal/README.md +++ b/kamal/README.md @@ -7,14 +7,13 @@ 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 +$ kamal setup ``` -TODO +``` +ubuntu@gamma:~$ mkdir -p .kamal/env/roles +ubuntu@gamma:~$ touch .kamal/env/roles/web-web.env +ubuntu@gamma:~$ chmod 600 .kamal/env/roles/web-web.env +``` -- [ ] Docker レジストリどうするか問題 +- Docker レジストリどうするか => Docker Hub などパブリックなものを使用するのが簡単 diff --git a/kamal/config/deploy.yml b/kamal/config/deploy.yml index d7391e9..2982ec0 100644 --- a/kamal/config/deploy.yml +++ b/kamal/config/deploy.yml @@ -1,10 +1,13 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/kjellberg/mrsk/validate-with-json-schema/lib/mrsk/configuration/schema.yaml -service: kamal-example -image: caddy +service: web +image: fogtype/caddy servers: - ubuntu@gamma.fogtype.com registry: - server: localhost:5000 - username: _ + username: fogtype password: - KAMAL_REGISTRY_PASSWORD +logging: + driver: journald +healthcheck: + cmd: /bin/true