mirror of
https://github.com/kou029w/fogtype.com
synced 2025-01-18 08:05:02 +00:00
removed db container
This commit is contained in:
parent
2dcfb7e737
commit
d2ce3006b1
3 changed files with 5 additions and 18 deletions
1
.env.example
Normal file
1
.env.example
Normal file
|
@ -0,0 +1 @@
|
|||
#DATABASE_URL=
|
|
@ -5,6 +5,7 @@
|
|||
- Docker Compose
|
||||
- systemd
|
||||
- systemd-journald
|
||||
- PostgreSQL
|
||||
|
||||
Git リポジトリを取得し、設定ファイルを配置
|
||||
|
||||
|
@ -14,7 +15,8 @@ git clone git@github.com:kou029w/keiu.net.git
|
|||
cd keiu.net
|
||||
sudo install -m 644 {,/}etc/docker/daemon.json
|
||||
sudo systemctl restart docker
|
||||
install -m 600 <(echo POSTGRES_PASSWORD=$(python3 -c 'import secrets; print(secrets.token_urlsafe())')) .env
|
||||
cp .env{.example,}
|
||||
editor .env # PostgreSQL接続URLを設定
|
||||
```
|
||||
|
||||
## 構築
|
||||
|
|
18
compose.yml
18
compose.yml
|
@ -17,24 +17,10 @@ services:
|
|||
restart: unless-stopped
|
||||
environment:
|
||||
LISTEN_ADDR: /tmp/miniflux.sock
|
||||
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@/postgres?host=/tmp/postgresql
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
RUN_MIGRATIONS: "1"
|
||||
volumes:
|
||||
- minicharge_tmp:/tmp
|
||||
- postgres_tmp:/tmp/postgresql
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
db:
|
||||
image: postgres:14.3-alpine@sha256:5973fec8d8284c8961ac3c23945e52d533dd0d21cc7b3c7dd7a46fd199bed4a4
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: pg_isready -U postgres
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_tmp:/var/run/postgresql
|
||||
- postgres_data_v14:/var/lib/postgresql/data
|
||||
dns.keiu.net:
|
||||
image: coredns/coredns:1.9.3@sha256:8e352a029d304ca7431c6507b56800636c321cb52289686a581ab70aaa8a2e2a
|
||||
restart: unless-stopped
|
||||
|
@ -52,5 +38,3 @@ volumes:
|
|||
caddy_data:
|
||||
caddy_config:
|
||||
minicharge_tmp:
|
||||
postgres_tmp:
|
||||
postgres_data_v14:
|
||||
|
|
Loading…
Add table
Reference in a new issue