first commit

This commit is contained in:
usbharu 2024-12-27 14:06:35 +09:00
commit 16deca9327
Signed by: usbharu
GPG Key ID: 95CBCF7046307B77
9 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,36 @@
name: build and deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: git.usbharu.dev
username: usbharu
password: ${{ secrets.PUBLIC_REPOSITORY_PACKAGE_WRITE_TOKEN }}
- name: metadata
id: meta
uses: docker/metadata-action@v5
with:
images: git.usbharu.dev/usbharu/misskey-sorry-page
tags: |
type=raw,value=latest
type=sha,prefix=,suffix=,format=short
- name: build
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# デフォルトの無視対象ファイル
/shelf/
/workspace.xml
# エディターベースの HTTP クライアントリクエスト
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/misskey-sorry-page.iml" filepath="$PROJECT_DIR$/misskey-sorry-page.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM nginx:1.27.3
LABEL authors="usbharu"
COPY sorry.html /usr/share/nginx/html/sorry.html
COPY sorry.conf /etc/nginx/conf.d/sorry.conf

8
misskey-sorry-page.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="GENERAL_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

17
sorry.conf Normal file
View File

@ -0,0 +1,17 @@
server {
listen 3000;
# エラーページの指定
error_page 503 /sorry.html;
# エラーページのファイルを提供
location = /sorry.html {
root /usr/share/nginx/html/;
internal;
}
# 全てのリクエストに対して503を返す
location / {
return 503;
}
}

19
sorry.html Normal file
View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>503 Service Unavailable</title>
</head>
<body style="font-family: Arial, sans-serif; text-align: center; padding: 50px; background-color: #f8f9fa; color: #333;">
<h1 style="color: #d9534f;">503 Service Unavailable</h1>
<p>現在メンテナンス中です。ご迷惑をおかけして申し訳ございません。</p>
<p>We are currently undergoing maintenance. We apologize for the inconvenience.</p>
<p>お問い合わせ先:</p>
<ul style="list-style: none; padding: 0;">
<li><a href="mailto:admin@usbharu.dev" style="color: #007bff; text-decoration: none;">メール: admin@usbharu.dev</a></li>
<li><a href="https://mk.yopo.work/@usbharu" style="color: #007bff; text-decoration: none;" target="_blank">暫定よぽすき: @usbharu@mk.yopo.work</a></li>
<li><a href="https://fedibird.com/@usbharu" style="color: #007bff; text-decoration: none;" target="_blank">Fedibird: @usbharu@fedibird.com</a></li>
</ul>
</body>
</html>