init
This commit is contained in:
24
.gitea/workflows/build.yml
Normal file
24
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Gitea Auto Deploy
|
||||
run-name: ${{ gitea.actor }} pushed code 🚀
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Deploy-Container:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out latest code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Stop and remove old containers
|
||||
run: |
|
||||
docker compose down || true
|
||||
|
||||
- name: Remove unused Docker resources
|
||||
run: |
|
||||
docker system prune -a --volumes -f
|
||||
|
||||
- name: Build and restart containers
|
||||
run: |
|
||||
docker compose up -d
|
||||
0
.history/Dockerfile_20260317180937
Normal file
0
.history/Dockerfile_20260317180937
Normal file
4
.history/Dockerfile_20260317180943
Normal file
4
.history/Dockerfile_20260317180943
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM nginx:alpine
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
9
.history/Dockerfile_20260317181102
Normal file
9
.history/Dockerfile_20260317181102
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:stable-alpine3.20-slim
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
9
.history/Dockerfile_20260317181115
Normal file
9
.history/Dockerfile_20260317181115
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:stable-alpine3.21-slim
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
9
.history/Dockerfile_20260317181252
Normal file
9
.history/Dockerfile_20260317181252
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:1.28.2-alpine, stable-alpine,
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
9
.history/Dockerfile_20260317181255
Normal file
9
.history/Dockerfile_20260317181255
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:stable-alpine,
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
9
.history/Dockerfile_20260317181258
Normal file
9
.history/Dockerfile_20260317181258
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
0
.history/docker-compose_20260317181011.yml
Normal file
0
.history/docker-compose_20260317181011.yml
Normal file
7
.history/docker-compose_20260317181017.yml
Normal file
7
.history/docker-compose_20260317181017.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
migration-page:
|
||||
build: .
|
||||
container_name: srtools-migration
|
||||
ports:
|
||||
- "8080:80"
|
||||
restart: always
|
||||
7
.history/docker-compose_20260317181403.yml
Normal file
7
.history/docker-compose_20260317181403.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
migration-page:
|
||||
build: .
|
||||
container_name: srtools-migration
|
||||
ports:
|
||||
- "3008:80"
|
||||
restart: always
|
||||
0
.history/index_20260317180916.html
Normal file
0
.history/index_20260317180916.html
Normal file
68
.history/index_20260317180921.html
Normal file
68
.history/index_20260317180921.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Domain Migration - SRTools</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
body { background-color: #0f172a; color: white; font-family: sans-serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen flex items-center justify-center p-4">
|
||||
<div class="max-w-2xl w-full bg-slate-800 border border-slate-700 rounded-2xl p-8 shadow-2xl">
|
||||
<div class="text-center">
|
||||
<h1 id="title" class="text-3xl font-bold mb-4 bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent"></h1>
|
||||
<p id="desc" class="text-lg font-medium mb-4 text-slate-200"></p>
|
||||
<p id="inst" class="text-sm text-slate-400 mb-8"></p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<button onclick="exportData()" class="flex items-center justify-center gap-2 bg-slate-700 hover:bg-slate-600 font-semibold py-4 px-6 rounded-xl border border-slate-600 transition-all">
|
||||
<span id="btnExport"></span>
|
||||
</button>
|
||||
<a href="https://srtools.punklorde.org" class="flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 font-semibold py-4 px-6 rounded-xl shadow-lg transition-all text-center">
|
||||
<span id="btnGo"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const translations = {
|
||||
vi: { title: "Thông báo chuyển đổi", desc: "srtools.kain.id.vn chuyển sang srtools.punklorde.org", inst: "Vui lòng backup dữ liệu. Tại web mới chọn 'Load Data' -> 'Database' để restore.", btnExport: "Tải backup (.json)", btnGo: "Đi đến web mới" },
|
||||
en: { title: "Domain Migration", desc: "Moving from srtools.kain.id.vn to srtools.punklorde.org", inst: "Please backup your data. On the new site, select 'Load Data' -> 'Database'.", btnExport: "Download backup", btnGo: "Go to new site" },
|
||||
ja: { title: "移転のお知らせ", desc: "srtools.punklorde.org へ移転します", inst: "データのバックアップを取り、新しいサイトで復元してください。", btnExport: "バックアップをダウンロード", btnGo: "新しいサイトへ" },
|
||||
ko: { title: "이전 안내", desc: "srtools.punklorde.org로 이전합니다", inst: "데이터를 백업하고 새 사이트에서 복구해 주세요.", btnExport: "백업 다운로드", btnGo: "새 사이트로 이동" },
|
||||
zh: { title: "迁移通知", desc: "正在迁移至 srtools.punklorde.org", inst: "请备份您的数据并在新网站进行恢复。", btnExport: "下载备份文件", btnGo: "前往新域名" }
|
||||
};
|
||||
|
||||
const lang = (navigator.language.split('-')[0] in translations) ? navigator.language.split('-')[0] : 'en';
|
||||
const t = translations[lang];
|
||||
|
||||
document.getElementById('title').innerText = t.title;
|
||||
document.getElementById('desc').innerText = t.desc;
|
||||
document.getElementById('inst').innerText = t.inst;
|
||||
document.getElementById('btnExport').innerText = t.btnExport;
|
||||
document.getElementById('btnGo').innerText = t.btnGo;
|
||||
|
||||
function exportData() {
|
||||
const storageData = localStorage.getItem('user-data-storage');
|
||||
if (!storageData) {
|
||||
alert("No data found in localStorage!");
|
||||
return;
|
||||
}
|
||||
const parsed = JSON.parse(storageData);
|
||||
const data = parsed.state || parsed;
|
||||
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = "database-data.json";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:stable-alpine
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN chmod 644 /usr/share/nginx/html/index.html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
migration-page:
|
||||
build: .
|
||||
container_name: srtools-migration
|
||||
ports:
|
||||
- "3008:80"
|
||||
restart: always
|
||||
68
index.html
Normal file
68
index.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="vi">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Domain Migration - SRTools</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<style>
|
||||
body { background-color: #0f172a; color: white; font-family: sans-serif; }
|
||||
</style>
|
||||
</head>
|
||||
<body class="min-h-screen flex items-center justify-center p-4">
|
||||
<div class="max-w-2xl w-full bg-slate-800 border border-slate-700 rounded-2xl p-8 shadow-2xl">
|
||||
<div class="text-center">
|
||||
<h1 id="title" class="text-3xl font-bold mb-4 bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent"></h1>
|
||||
<p id="desc" class="text-lg font-medium mb-4 text-slate-200"></p>
|
||||
<p id="inst" class="text-sm text-slate-400 mb-8"></p>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<button onclick="exportData()" class="flex items-center justify-center gap-2 bg-slate-700 hover:bg-slate-600 font-semibold py-4 px-6 rounded-xl border border-slate-600 transition-all">
|
||||
<span id="btnExport"></span>
|
||||
</button>
|
||||
<a href="https://srtools.punklorde.org" class="flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 font-semibold py-4 px-6 rounded-xl shadow-lg transition-all text-center">
|
||||
<span id="btnGo"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const translations = {
|
||||
vi: { title: "Thông báo chuyển đổi", desc: "srtools.kain.id.vn chuyển sang srtools.punklorde.org", inst: "Vui lòng backup dữ liệu. Tại web mới chọn 'Load Data' -> 'Database' để restore.", btnExport: "Tải backup (.json)", btnGo: "Đi đến web mới" },
|
||||
en: { title: "Domain Migration", desc: "Moving from srtools.kain.id.vn to srtools.punklorde.org", inst: "Please backup your data. On the new site, select 'Load Data' -> 'Database'.", btnExport: "Download backup", btnGo: "Go to new site" },
|
||||
ja: { title: "移転のお知らせ", desc: "srtools.punklorde.org へ移転します", inst: "データのバックアップを取り、新しいサイトで復元してください。", btnExport: "バックアップをダウンロード", btnGo: "新しいサイトへ" },
|
||||
ko: { title: "이전 안내", desc: "srtools.punklorde.org로 이전합니다", inst: "데이터를 백업하고 새 사이트에서 복구해 주세요.", btnExport: "백업 다운로드", btnGo: "새 사이트로 이동" },
|
||||
zh: { title: "迁移通知", desc: "正在迁移至 srtools.punklorde.org", inst: "请备份您的数据并在新网站进行恢复。", btnExport: "下载备份文件", btnGo: "前往新域名" }
|
||||
};
|
||||
|
||||
const lang = (navigator.language.split('-')[0] in translations) ? navigator.language.split('-')[0] : 'en';
|
||||
const t = translations[lang];
|
||||
|
||||
document.getElementById('title').innerText = t.title;
|
||||
document.getElementById('desc').innerText = t.desc;
|
||||
document.getElementById('inst').innerText = t.inst;
|
||||
document.getElementById('btnExport').innerText = t.btnExport;
|
||||
document.getElementById('btnGo').innerText = t.btnGo;
|
||||
|
||||
function exportData() {
|
||||
const storageData = localStorage.getItem('user-data-storage');
|
||||
if (!storageData) {
|
||||
alert("No data found in localStorage!");
|
||||
return;
|
||||
}
|
||||
const parsed = JSON.parse(storageData);
|
||||
const data = parsed.state || parsed;
|
||||
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = "database-data.json";
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
URL.revokeObjectURL(url);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user