create project

This commit is contained in:
Nebel 2024-12-12 22:38:49 +09:00
parent f2b7835ad2
commit 7164117e27
Signed by: nebel
GPG key ID: 79807D08C6EF6460
6 changed files with 108 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.env

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
REMOTE_HOST := $(notdir $(shell pwd -L))
.PHONY: help
help:
@cat README.md
.PHONY: install
install:
ssh $(REMOTE_HOST) <$@
.PHONY: deploy
deploy:
ssh $(REMOTE_HOST) <$@
.env:
touch $@
chmod 600 $@
@echo POSTGRES_PASSWORD=$(shell openssl rand -hex 32) >$@

33
README.md Normal file
View file

@ -0,0 +1,33 @@
# daraz-tek.beta.fogtype.com
だらずてっくの Slack のアーカイブ
Slack のログの移行方法: <https://docs.mattermost.com/onboard/migrate-from-slack.html>
## 構成
- Ubuntu 22.04 LTS Server
## 使用方法
### サーバーへのインストール
```
make install
```
### サーバーにデプロイ
```
make deploy
```
### 環境変数ファイルの生成
```
make .env
```
## ライセンス
WTFPL

41
compose.yml Normal file
View file

@ -0,0 +1,41 @@
name: daraz-tek
services:
mattermost:
image: mattermost/mattermost-team-edition
restart: unless-stopped
security_opt:
- no-new-privileges:true
pids_limit: 200
tmpfs:
- /tmp
ports:
- "8065:8065"
volumes:
- mattermost_data:/mattermost
environment:
TZ: Asia/Tokyo
MM_LOCALIZATIONSETTINGS_DEFAULTCLIENTLOCALE: ja
MM_BLEVESETTINGS_INDEXDIR: /mattermost/bleve-indexes
MM_SERVICESETTINGS_SITEURL: https://daraz-tek.beta.fogtype.com
MM_SQLSETTINGS_DRIVERNAME: postgres
MM_SQLSETTINGS_DATASOURCE: postgres://postgres:${POSTGRES_PASSWORD:?}@postgres:5432/postgres?sslmode=disable&connect_timeout=10
MM_TEAMSETTINGS_MAXUSERSPERTEAM: "100"
depends_on:
- postgres
postgres:
image: postgres:17-alpine
restart: unless-stopped
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: true
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- postgres_data_v17:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD
volumes:
mattermost_data:
postgres_data_v17:

9
deploy Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
set -eu
cd "${HOME}/daraz-tek.beta.fogtype.com"
git pull --recurse-submodules --rebase --autostash
docker compose up --build --detach
cd -

6
install Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
set -eu
sudo apt install -y git make
git clone https://github.com/kou029w/daraz-tek.beta.fogtype.com
make -C daraz-tek.beta.fogtype.com .env