UPDATE: starting the real website

This commit is contained in:
dorian melenotte 2024-08-03 15:58:00 +02:00
parent 4140a77ce3
commit 7a1c302d5a
7 changed files with 40 additions and 34 deletions

12
Dokerfile Normal file
View File

@ -0,0 +1,12 @@
FROM docker.io/oven/bun:1.1-slim AS build
WORKDIR /app
COPY package.json bun.lockb .
RUN bun install
COPY . .
RUN bun run build
EXPOSE 5173
CMD ["bun start", "host", "0"]
##-p pour acceder au port

View File

@ -1,12 +0,0 @@
FROM thecodingmachine/nodejs:16-bun AS build
WORKDIR /app
COPY package.json bun.lockb .
RUN bun install
COPY . .
RUN bun run build
FROM nginx:stable-alpine AS production
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,18 +0,0 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /index.html;
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
log_not_found off;
}
}

View File

@ -1,3 +1,3 @@
export function App() {
return <h1> Bienvenue sur Gmoker.com</h1>;
return <h1 style={{ textAlign: "center" }}> Bienvenue sur Gmoker.com</h1>;
}

15
src/component/Head.jsx Normal file
View File

@ -0,0 +1,15 @@
export function Header() {
return (
<div
style={{
display: "flex",
justifyContent: "space-between",
}}
>
<h1 style={{ textAlign: "left" }}>
Aceuil About Product Blog Serveurs Dowloads Help
</h1>
<h1 style={{ textAlign: "right" }}>Acount Get started</h1>
</div>
);
}

View File

@ -2,5 +2,10 @@ export function Navbar() {
/* console.log("coucou les zamis");
const sex = 5; */
return <p> Navbar woula</p>;
return (
<p style={{ textAlign: "center", color: "red", background: "green" }}>
{" "}
Welcome to gmoker, the the website is under construction
</p>
);
}

View File

@ -6,19 +6,20 @@ import { Body } from "./component/Body.jsx";
import { Footer } from "./component/Footer.jsx";
import { Postcard } from "./component/Card.jsx";
import { Button } from "./component/Button.jsx";
import { Header } from "./component/Head.jsx";
import chat from "./assets/chat_sex.jpg";
function buttoncaller(argv) {
console.log(argv);
alert(argv);
}
ReactDOM.createRoot(document.getElementById("root")).render(
<>
<Navbar />
<Header />
<App />
<Body />
<Postcard name="dorian" img={chat} color="red" />
<Postcard name="Jesussamere" img={chat} color="blue" />
<Button
title="click"
clicked={() => {
@ -28,3 +29,6 @@ ReactDOM.createRoot(document.getElementById("root")).render(
<Footer />
</>
);
//<Postcard name="dorian" img={chat} color="red" />
//<Postcard name="Jesussamere" img={chat} color="blue" />