2023-01-02 00:40:21 +09:00
|
|
|
# β
|
2023-01-01 23:38:14 +09:00
|
|
|
|
2023-01-02 00:40:21 +09:00
|
|
|
beta.fogtype.com
|
|
|
|
: 使い捨て実行環境
|
|
|
|
|
2023-01-02 01:15:12 +09:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
1. beta.fogtype.com に SSH でアクセス
|
|
|
|
2. `caddy`、`caddy.reverse_proxy` ラベルを与えて Docker コンテナを実行
|
|
|
|
- 例: `--label=caddy=example.beta.fogtype.com --label=caddy.reverse_proxy={{upstreams}}`
|
|
|
|
3. `caddy` ネットワークにアタッチ
|
|
|
|
|
|
|
|
詳しい使い方は [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy#readme) を参照
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
[example/compose.yml](example/compose.yml)
|
|
|
|
|
|
|
|
```sh
|
|
|
|
docker context create --docker=host=ssh://ubuntu@beta.fogtype.com beta
|
|
|
|
docker context use beta
|
|
|
|
docker compose --project-directory=example up -d
|
|
|
|
```
|
|
|
|
|
2023-01-02 00:40:21 +09:00
|
|
|
## Setup
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo apt install ansible
|
|
|
|
ansible-playbook setup.yml
|
|
|
|
```
|
|
|
|
|
|
|
|
詳しい構成は [setup.yml](setup.yml) を参照
|
2024-01-03 21:34:51 +09:00
|
|
|
|
|
|
|
## Registration
|
|
|
|
|
|
|
|
```
|
|
|
|
$ make .deploy_key
|
|
|
|
```
|
|
|
|
|
|
|
|
secrets.KNOWN_HOSTS
|
|
|
|
: SSH known_hosts file
|
|
|
|
|
|
|
|
secrets.DEPLOY_KEY
|
|
|
|
: SSH identity file
|