1
0
Fork 0
mirror of https://github.com/kou029w/fogtype.com synced 2025-01-18 08:05:02 +00:00

create project

This commit is contained in:
Nebel 2021-07-18 19:35:25 +09:00
parent efe1d3856a
commit 0fa4e07b6c
7 changed files with 101 additions and 0 deletions

11
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,11 @@
name: deploy
on:
push:
branches: [master]
jobs:
main:
runs-on: ubuntu-latest
steps:
- run: install -m 700 -d ~/.ssh
- run: install -m 600 <(echo '${{ secrets.DEPLOY_KEY }}') ~/.ssh/deploy_key
- run: ssh -i ~/.ssh/deploy_key -o 'StrictHostKeyChecking no' kou029w@keiu.net 'sh -c "cd ~/keiu.net && git pull --rebase && docker-compose up -d"'

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/.env
/etc/postgres/initdb.d/

23
README.md Normal file
View file

@ -0,0 +1,23 @@
# ほんの少し降る雨
## 前提
- Docker Compose
- systemd-journald
Git リポジトリを取得し、 /etc/docker/daemon.json を配置
```sh
ssh kou029w@keiu.net
git clone git@github.com:kou029w/keiu.net.git
cd keiu.net
sudo tee /etc/docker/daemon.json < etc/docker/daemon.json
```
## 構築
```sh
echo POSTGRES_PASSWORD=$(python3 -c 'import secrets; print(secrets.token_urlsafe())') >> .env
chmod 600 .env
docker-compose up -d
```

42
docker-compose.yml Normal file
View file

@ -0,0 +1,42 @@
version: "3"
services:
https:
image: caddy:2.4.3-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./etc/caddy:/etc/caddy
- caddy_data:/data
- caddy_config:/config
- minicharge_tmp:/tmp/minicharge
minicharge:
image: miniflux/miniflux:2.0.31
restart: unless-stopped
environment:
LISTEN_ADDR: /tmp/miniflux.sock
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@/postgres?host=/tmp/postgresql
volumes:
- minicharge_tmp:/tmp
- postgres_tmp:/tmp/postgresql
depends_on:
db:
condition: service_healthy
db:
image: postgres:13.3-alpine
restart: unless-stopped
healthcheck:
test: pg_isready
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./etc/postgres/initdb.d:/docker-entrypoint-initdb.d
- postgres_tmp:/var/run/postgresql
- postgres_data:/var/lib/postgresql/data
volumes:
caddy_data:
caddy_config:
minicharge_tmp:
postgres_tmp:
postgres_data:

9
etc/caddy/Caddyfile Normal file
View file

@ -0,0 +1,9 @@
keiu.net {
respond "WIP"
}
www.keiu.net {
redir https://keiu.net{uri} 308
}
minicharge.keiu.net {
reverse_proxy unix//tmp/minicharge/miniflux.sock
}

4
etc/docker/daemon.json Normal file
View file

@ -0,0 +1,4 @@
{
"live-restore": true,
"log-driver": "journald"
}

10
renovate.json Normal file
View file

@ -0,0 +1,10 @@
{
"extends": [
"config:base",
":automergeAll",
":automergeBranch",
":skipStatusChecks",
"docker:enableMajor",
"docker:pinDigests"
]
}