refactor: Move Astro to root, use PORT env (default 80), allow all hosts

- Move Astro files from dealplustech-astro/ to project root
- Update Dockerfile: PORT environment variable (default 80)
- Add vite.config.ts with allowedHosts: true
- Matches nixpacks behavior for Easypanel deployment
- No hardcoded ports or domains
This commit is contained in:
Kunthawat Greethong
2026-03-03 11:40:50 +07:00
parent f972f68875
commit 443c3377e2
10383 changed files with 4019 additions and 19183 deletions

55
node_modules/astro/dist/runtime/server/render/head.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
import { markHTMLString } from "../escape.js";
import { renderCspContent } from "./csp.js";
import { createRenderInstruction } from "./instruction.js";
import { renderElement } from "./util.js";
const uniqueElements = (item, index, all) => {
const props = JSON.stringify(item.props);
const children = item.children;
return index === all.findIndex((i) => JSON.stringify(i.props) === props && i.children == children);
};
function renderAllHeadContent(result) {
result._metadata.hasRenderedHead = true;
let content = "";
if (result.shouldInjectCspMetaTags && result.cspDestination === "meta") {
content += renderElement(
"meta",
{
props: {
"http-equiv": "content-security-policy",
content: renderCspContent(result)
},
children: ""
},
false
);
}
const styles = Array.from(result.styles).filter(uniqueElements).map(
(style) => style.props.rel === "stylesheet" ? renderElement("link", style) : renderElement("style", style)
);
result.styles.clear();
const scripts = Array.from(result.scripts).filter(uniqueElements).map((script) => {
if (result.userAssetsBase) {
script.props.src = (result.base === "/" ? "" : result.base) + result.userAssetsBase + script.props.src;
}
return renderElement("script", script, false);
});
const links = Array.from(result.links).filter(uniqueElements).map((link) => renderElement("link", link, false));
content += styles.join("\n") + links.join("\n") + scripts.join("\n");
if (result._metadata.extraHead.length > 0) {
for (const part of result._metadata.extraHead) {
content += part;
}
}
return markHTMLString(content);
}
function renderHead() {
return createRenderInstruction({ type: "head" });
}
function maybeRenderHead() {
return createRenderInstruction({ type: "maybe-head" });
}
export {
maybeRenderHead,
renderAllHeadContent,
renderHead
};