This commit is contained in:
mei 2024-11-30 13:00:54 +08:00
parent 59f99c40fe
commit a4fc0ed9fe
5 changed files with 7 additions and 14 deletions

View File

@ -1,2 +1 @@
NEXT_PUBLIC_BASE_URL=https://example.net NEXT_PUBLIC_BASE_URL=https://example.net
NEXT_PUBLIC_ADMIN_EMAIL=example@example.com

View File

@ -11,8 +11,8 @@ export default function Home() {
<p> cat ,</p> <p> cat ,</p>
<p className="mt-2"> <p className="mt-2">
{' '} {' '}
<a href="mailto:${process.env.NEXT_PUBLIC_ADMIN_EMAIL}" className="underline"> <a href="mailto:i@mei.lv" className="underline">
{process.env.NEXT_PUBLIC_ADMIN_EMAIL} i@mei.lv
</a> </a>
</p> </p>
</div> </div>

View File

@ -183,8 +183,8 @@ export default function RedirectPage({ params }: { params: { shortCode: string }
<CardFooter className="justify-center"> <CardFooter className="justify-center">
<p className="text-sm text-gray-500"> <p className="text-sm text-gray-500">
{' '} {' '}
<a href="mailto:${process.env.NEXT_PUBLIC_ADMIN_EMAIL}" className="text-blue-500 hover:underline"> <a href="mailto:i@mei.lv" className="text-blue-500 hover:underline">
{process.env.NEXT_PUBLIC_ADMIN_EMAIL} i@mei.lv
</a> </a>
</p> </p>
</CardFooter> </CardFooter>

View File

@ -70,12 +70,12 @@ if [ $? -ne 0 ]; then
echo -e "\e[31m下载 docker-compose.yaml 文件失败,请检查网络连接\033[0m" echo -e "\e[31m下载 docker-compose.yaml 文件失败,请检查网络连接\033[0m"
exit 1 exit 1
fi fi
echo "NEXT_PUBLIC_BASE_URL=$DomainName echo "NEXT_PUBLIC_BASE_URL=$DomainName" > "$InstallDir/short-url/.env"
NEXT_PUBLIC_ADMIN_EAMIL=$email" > "$InstallDir/short-url/.env"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\e[31m创建 .env 文件失败\033[0m" echo -e "\e[31m创建 .env 文件失败\033[0m"
exit 1 exit 1
fi fi
find "$InstallDir" -type f -exec sed -i "s/i@mei.lv/$email/g" {} \;
# Build Docker image # Build Docker image
cd "$InstallDir/short-url" cd "$InstallDir/short-url"

6
env.d.ts vendored
View File

@ -1,6 +0,0 @@
declare namespace NodeJS {
interface ProcessEnv {
NEXT_PUBLIC_ADMIN_EMAIL: string;
NEXT_PUBLIC_ADMIN_EMAIL: string;
}
}