This commit is contained in:
parent
a63ba657a7
commit
f5e467219d
3 changed files with 32 additions and 0 deletions
|
@ -19,6 +19,7 @@ steps:
|
|||
- docker context create --docker=host=ssh://ubuntu@beta.fogtype.com beta
|
||||
- docker context use beta
|
||||
- docker compose --project-name=beta up --detach
|
||||
- docker compose --project-directory=example up --detach
|
||||
volumes:
|
||||
- name: ssh_key
|
||||
path: /home/ubuntu/.ssh/id_ed25519
|
||||
|
|
19
README.md
19
README.md
|
@ -3,6 +3,25 @@
|
|||
beta.fogtype.com
|
||||
: 使い捨て実行環境
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
```sh
|
||||
|
|
12
example/compose.yml
Normal file
12
example/compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
services:
|
||||
example:
|
||||
image: caddy:2.6.2-alpine
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- caddy
|
||||
labels:
|
||||
caddy: example.beta.fogtype.com
|
||||
caddy.reverse_proxy: "{{upstreams}}"
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
Loading…
Add table
Reference in a new issue