Working on getting the dockerfile right
Replacement works, but not from the point of container start
This commit is contained in:
parent
b18782a5fb
commit
0d7285dade
@ -9,6 +9,11 @@ COPY . .
|
|||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
ENV TITLE "My Website"
|
||||||
|
|
||||||
EXPOSE 4173
|
EXPOSE 4173
|
||||||
|
|
||||||
|
RUN sed -i -e 's/HTMLTITLE/'"${TITLE}"'/g' ./index.html
|
||||||
|
RUN sed -i -e 's/HTMLTITLE/'"${TITLE}"'/g' ./src/main.tsx
|
||||||
|
|
||||||
CMD ["npm", "run", "start"]
|
CMD ["npm", "run", "start"]
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
||||||
<title>Starbase 80</title>
|
<title>HTMLTITLE</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
@ -24,6 +24,8 @@ services:
|
|||||||
image: jordanroher/starbase-80
|
image: jordanroher/starbase-80
|
||||||
ports:
|
ports:
|
||||||
- 4173:4173
|
- 4173:4173
|
||||||
|
environment:
|
||||||
|
- TITLE=My Homepage
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/app/src/config.json
|
- ./config.json:/app/src/config.json
|
||||||
- ./icons:/app/public/icons # or wherever, JSON icon paths are relative to /app/public
|
- ./icons:/app/public/icons # or wherever, JSON icon paths are relative to /app/public
|
||||||
|
@ -5,6 +5,6 @@ import "./tailwind.css";
|
|||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<IndexPage title="Starbase 80" icon="/logo.png" />
|
<IndexPage title="HTMLTITLE" icon="/logo.png" />
|
||||||
</React.StrictMode>
|
</React.StrictMode>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user