docker compose down

This commit is contained in:
Nebel 2024-01-03 20:43:49 +09:00
parent ce07bf1982
commit dbec4baa31
Signed by: nebel
GPG key ID: 79807D08C6EF6460
4 changed files with 4 additions and 131 deletions

View file

@ -1,50 +0,0 @@
# yaml-language-server: $schema=https://json.schemastore.org/drone.json
name: deploy
kind: pipeline
type: docker
node:
instance: system
trigger:
event:
- push
branch:
- main
steps:
- name: deploy
image: docker:23.0.6-cli-alpine3.17@sha256:53221a6781b9360dc2965112998cfd209034f2b8cdf98bdc314dfd740bb3c845
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- echo -n "$${ENV}" > .env
- docker compose --project-name=gammafogtypecom up --detach
- docker image prune --all --filter=until=24h --force
environment:
ENV:
from_secret: ENV
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
---
name: renovate
kind: pipeline
type: docker
clone:
disable: true
trigger:
event:
- cron
cron:
- renovate
steps:
- name: renovate
image: renovate/renovate:37.118.0@sha256:c5fc1708153b809f4c47e08de18907e9d4ac819e198e3d4bfc851e9b92ffe6e3
commands:
- renovate
environment:
RENOVATE_PLATFORM: gitea
RENOVATE_ENDPOINT: https://git.fogtype.com/api/v1/
RENOVATE_AUTODISCOVER: "true"
RENOVATE_TOKEN:
from_secret: RENOVATE_TOKEN

View file

@ -1,9 +0,0 @@
SERVER_HOST=gamma.fogtype.com
DRONE_GITEA_SERVER=https://git.fogtype.com/
DRONE_GITEA_CLIENT_ID=
DRONE_GITEA_CLIENT_SECRET=
DRONE_RPC_SECRET=
DRONE_SERVER_HOST=${SERVER_HOST}
DRONE_SERVER_PROTO=https
DRONE_ADMIN_USER=
DRONE_USER_CREATE=username:${DRONE_ADMIN_USER},admin:true

View file

@ -13,22 +13,6 @@ ansible-playbook setup.yml
詳しい構成は [setup.yml](setup.yml) を参照
## Drone Server & Runner
Gitea への導入
: https://docs.drone.io/server/provider/gitea/
| 項目 | 値 |
| ---------------- | ------------------------------- |
| Application Name | gamma |
| Redirect URI | https://gamma.fogtype.com/login |
```bash
install -m 600 .env{.example,}
echo DRONE_RPC_SECRET=$(openssl rand -hex 16) >> .env
# .envファイルに適切な設定をする
```
### Deploy
```bash
@ -36,3 +20,7 @@ docker context create --docker=host=ssh://ubuntu@gamma.fogtype.com gamma
docker context use gamma
docker compose up -d
```
### Status
- 2024-01-03 運用停止

View file

@ -1,56 +0,0 @@
services:
caddy:
image: caddy:2.7.6-alpine@sha256:eabac2898cf9fc7dc94d3fb03ac84c9c923aa6cc6f04874937d2f525e0d2f006
restart: unless-stopped
ports:
- "80:80"
- "443:443/udp"
- "443:443/tcp"
- "127.0.0.1:2019:2019"
command: caddy reverse-proxy --from ${SERVER_HOST:?} --to http://drone
volumes:
- caddy_data:/data
- caddy_config:/config
drone:
image: drone/drone:2.22.0@sha256:4d5e7f98278d02808c63358a214c4eb787d54f0a2f1fb60fbac8f47828d3558e
restart: unless-stopped
environment:
DRONE_CRON_INTERVAL: 1m
DRONE_GITEA_SERVER: ${DRONE_GITEA_SERVER:?}
DRONE_GITEA_CLIENT_ID: ${DRONE_GITEA_CLIENT_ID:?}
DRONE_GITEA_CLIENT_SECRET: ${DRONE_GITEA_CLIENT_SECRET:?}
DRONE_RPC_SECRET: ${DRONE_RPC_SECRET:?}
DRONE_SERVER_HOST: ${DRONE_SERVER_HOST:?}
DRONE_SERVER_PROTO: ${DRONE_SERVER_PROTO:?}
DRONE_USER_CREATE: ${DRONE_USER_CREATE:?}
volumes:
- drone_data_v2:/data
runner:
image: drone/drone-runner-docker:1.8.3@sha256:513891eb6c8b920c48266f6881402b9df5e3f7ec874a12cd87146ebfd1105bed
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
DRONE_RUNNER_NAME: default
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: drone
DRONE_RPC_SECRET: ${DRONE_RPC_SECRET:?}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
system-runner:
image: drone/drone-runner-docker:1.8.3@sha256:513891eb6c8b920c48266f6881402b9df5e3f7ec874a12cd87146ebfd1105bed
restart: unless-stopped
ports:
- "127.0.0.1:5000:3000"
environment:
DRONE_RUNNER_NAME: system-runner
DRONE_RUNNER_LABELS: instance:system
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: drone
DRONE_RPC_SECRET: ${DRONE_RPC_SECRET:?}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
caddy_data:
caddy_config:
drone_data_v2: