Compare commits
4 Commits
930a844749
...
55d86dbcaf
| Author | SHA1 | Date | |
|---|---|---|---|
| 55d86dbcaf | |||
| e366379a57 | |||
| 19aa35195f | |||
| 4926c3b388 |
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -68,6 +68,9 @@ jobs:
|
|||||||
script: |
|
script: |
|
||||||
cd monitor-im-flur
|
cd monitor-im-flur
|
||||||
echo "Deploying Docker container..."
|
echo "Deploying Docker container..."
|
||||||
|
git clean -dfx
|
||||||
|
git reset --hard HEAD
|
||||||
|
git pull
|
||||||
docker-compose pull
|
docker-compose pull
|
||||||
docker-compose down
|
docker-compose down
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@@ -1,7 +1,11 @@
|
|||||||
FROM nginx
|
FROM oven/bun as builder
|
||||||
|
WORKDIR /app
|
||||||
COPY ./dist /usr/share/nginx/html
|
COPY . .
|
||||||
|
RUN bun install
|
||||||
|
RUN bun run build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
27
nginx.conf
Normal file
27
nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events { worker_connections 1024; }
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||||
|
expires 1y;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,9 +17,9 @@ export default function Card({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className={style.card}>
|
<div className={style.card}>
|
||||||
{header && (
|
{header ? (
|
||||||
<CardHeader icon={icon} content={name} isActive={active} />
|
<CardHeader icon={icon} content={name} active={active} />
|
||||||
)}
|
) : null}
|
||||||
<div className={style.cardContent}>{children}</div>
|
<div className={style.cardContent}>{children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
gap: 30px;
|
gap: 30px;
|
||||||
margin: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardRow {
|
.cardRow {
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
import classNames from "classnames/bind";
|
import classNames from "classnames";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
const styles = {
|
export default function CardHeader({ icon, content, active = false }) {
|
||||||
container: style.container,
|
|
||||||
active: style.active,
|
|
||||||
};
|
|
||||||
|
|
||||||
const cx = classNames.bind(styles);
|
|
||||||
|
|
||||||
export default function CardHeader({ icon, content, isActive = false }) {
|
|
||||||
return (
|
return (
|
||||||
<div className={cx("container", { active: isActive })}>
|
<div
|
||||||
|
className={classNames(style.container, {
|
||||||
|
[`${style.active}`]: active,
|
||||||
|
})}
|
||||||
|
>
|
||||||
<div className={style.title}>
|
<div className={style.title}>
|
||||||
<div className={style.icon}>{icon}</div>
|
<div className={style.icon}>{icon}</div>
|
||||||
<div className={style.content}>{content}</div>
|
<div className={style.content}>{content}</div>
|
||||||
|
|||||||
@@ -42,29 +42,31 @@ export default function Dashboard() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${style.dashboard} ${scheme}`}>
|
<div className={`${style.dashboard} ${scheme}`}>
|
||||||
<CardColumn>
|
<div className={style.body}>
|
||||||
<Card icon="🚊" name="Timetable">
|
<CardColumn>
|
||||||
<Timetable />
|
<Card icon="🚊" name="Timetable">
|
||||||
</Card>
|
<Timetable />
|
||||||
|
|
||||||
<CardRow>
|
|
||||||
<Card icon="🕐" name="Clock">
|
|
||||||
<Datetime />
|
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card icon="🌤" name="Weather">
|
<CardRow>
|
||||||
<Weather />
|
<Card icon="🕐" name="Clock">
|
||||||
|
<Datetime />
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card icon="🌤" name="Weather">
|
||||||
|
<Weather />
|
||||||
|
</Card>
|
||||||
|
</CardRow>
|
||||||
|
|
||||||
|
<Card icon="🔔" name="Terminal" active={true}>
|
||||||
|
<Terminal />
|
||||||
</Card>
|
</Card>
|
||||||
</CardRow>
|
|
||||||
|
|
||||||
<Card icon="🔔" name="Terminal" active={true}>
|
<Card icon="🧹" name="Flatastic">
|
||||||
<Terminal />
|
<Flatastic />
|
||||||
</Card>
|
</Card>
|
||||||
|
</CardColumn>
|
||||||
<Card icon="🧹" name="Flatastic">
|
</div>
|
||||||
<Flatastic />
|
|
||||||
</Card>
|
|
||||||
</CardColumn>
|
|
||||||
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
transition: 0.5s;
|
transition: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 30px;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
/* 7 to 16 */
|
/* 7 to 16 */
|
||||||
.day {
|
.day {
|
||||||
background-color: #007c7d;
|
background-color: #007c7d;
|
||||||
|
|||||||
Reference in New Issue
Block a user