11 Commits

6 changed files with 196 additions and 156 deletions

40
.dockerignore Normal file
View File

@@ -0,0 +1,40 @@
# Node modules
node_modules
**/node_modules
# Logs
*.log
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Build outputs
build
dist
out
.next
.cache
.parcel-cache
# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# OS files
.DS_Store
Thumbs.db
# IDE / Editor folders
.vscode
.idea
*.sublime-workspace
*.sublime-project
# Temporary files
*.swp
*.bak
*.tmp

63
.drone.yml Normal file
View File

@@ -0,0 +1,63 @@
---
kind: pipeline
type: docker
name: default
steps:
# Step 1: Check if Docker image for current version already exists
- name: check-version
image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands:
- apk add --no-cache git
- git fetch --tags
- LATEST_TAG=$(git describe --tags --abbrev=0)
- echo "Latest Git tag: $LATEST_TAG"
- |
if docker image inspect apps/homepage:$NEW_VERSION > /dev/null 2>&1; then
echo "Docker image apps/homepage:$NEW_VERSION already exists — skipping build"
exit 0
else
echo "Docker image apps/homepage:$NEW_VERSION not found — building..."
fi
# Step 2: Build Docker image with dynamic Git tag
- name: build-image
image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands:
- IMAGE_TAG=${DRONE_TAG:-latest}
- echo "Building Docker image apps/homepage:$IMAGE_TAG ..."
- docker build -t apps/homepage:$IMAGE_TAG .
# Step 3: Stop old container if exists
- name: stop-old
image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands:
- IMAGE_TAG=${DRONE_TAG:-latest}
- echo "Stopping old container..."
- docker rm -f homepage || true
# Step 4: Run container with dynamic tag
- name: run-container
image: docker:24
environment:
DOCKER_HOST: unix:///var/run/docker.sock
commands:
- IMAGE_TAG=${DRONE_TAG:-latest}
- echo "Starting container apps/homepage:$IMAGE_TAG ..."
- docker run -d \
--name homepage \
-p 3001:3000 \
-e NODE_ENV=production \
apps/homepage:$IMAGE_TAG
# Trigger pipeline on Git tags
trigger:
event:
- push
- tag

4
.idea/homepage.iml generated
View File

@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4"> <module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager"> <component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.react-router" />
</content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>

View File

@@ -6,168 +6,90 @@ import Link from "@mui/material/Link";
import Grid from "@mui/material/Grid"; import Grid from "@mui/material/Grid";
import Paper from "@mui/material/Paper"; import Paper from "@mui/material/Paper";
export function meta() { export function meta() {
return [ return [
{title: "Material UI - React Router example in TypeScript"}, { title: "Aetoskia Hideout" },
{ {
name: "description", name: "description",
content: content: "Welcome to Aetoskia's Hideout!",
"Welcome to Material UI - React Router example in TypeScript!", },
}, ];
];
} }
const services = { const services = {
media: [ media: [
{ { name: "Jellyseerr", url: "http://jellyseerr.aetoskia.com", desc: "Summon films and series from the digital void.", external: true },
name: "Jellyseerr", { name: "Sonarr", url: "http://sonarr.aetoskia.com", desc: "Keep the endless chronicles of TV under iron control.", external: true },
url: "http://jellyseerr.aetoskia.com", { name: "Radarr", url: "http://radarr.aetoskia.com", desc: "Command the legions of cinema, enforce cinematic order.", external: true },
desc: "Request movies & TV shows", { name: "qBit", url: "http://qbit.aetoskia.com", desc: "Torrent war engine, fetching data across the nether realms.", external: true },
}, ],
// { codebase: [
// name: "Ombi", { name: "Gitea", url: "http://gitea.aetoskia.com", desc: "Forge and safeguard code like a sacred relic.", external: true },
// url: "http://ombi.aetoskia.com", { name: "Registry", url: "http://registry.aetoskia.com", desc: "Monitor core constructs of the digital empire.", external: true },
// desc: "Request movies & TV shows", { name: "Drone", url: "http://drone.aetoskia.com", desc: "Automaton architect, building pipelines of perfection.", external: true },
// }, ],
{ monitoring: [
name: "Sonarr", { name: "Portainer", url: "http://portainer.aetoskia.com", desc: "Oversee the fleet of containers with unyielding vigilance.", external: true },
url: "http://sonarr.aetoskia.com", ],
desc: "TV series management",
},
{
name: "Radarr",
url: "http://radarr.aetoskia.com",
desc: "Movie management",
},
// {
// name: "Prowlarr",
// url: "http://prowlarr.aetoskia.com",
// desc: "Indexer management",
// },
{
name: "qBittorrent",
url: "http://qbit.aetoskia.com",
desc: "Download client & torrent manager",
external: true,
},
],
core: [
{
name: "Gitea",
url: "http://gitea.aetoskia.com",
desc: "Hosted on Core Server",
external: true,
},
],
}; };
export default function Home() { export default function Home() {
// @ts-ignore return (
return ( <Container maxWidth="lg">
<Container maxWidth="lg"> <Box
<Box sx={{
sx={{ minHeight: "120vh",
minHeight: "120vh", backgroundImage: "url('/extended_sigil.png')",
backgroundImage: "url('/extended_sigil.png')", backgroundSize: "cover",
backgroundSize: "cover", backgroundRepeat: "no-repeat",
backgroundRepeat: "no-repeat", backgroundPosition: "center",
backgroundPosition: "center", display: "flex",
display: "flex", flexDirection: "column",
flexDirection: "column", }}
}} >
> <Box sx={{ flex: 1 }} />
{/* Spacer pushes bottom part down */}
<Box sx={{flex: 1}}/>
{/* Bottom dashboard: only 50% height of viewport */} <Box sx={{ height: "60vh", overflowY: "auto", p: 2 }}>
<Box <Container
sx={{ maxWidth="lg"
height: "60vh", // 50% of viewport height sx={{ bgcolor: "#1a1a1a", borderRadius: 3, p: 3, boxShadow: 6 }}
overflowY: "auto", // scroll if content overflows >
p: 2, {Object.entries(services).map(([sectionName, serviceList]) => (
}} <React.Fragment key={sectionName}>
<Typography
variant="h5"
align="center"
sx={{ color: "warning.main", mt: 4, mb: 2 }}
> >
<Container {sectionName.charAt(0).toUpperCase() + sectionName.slice(1)} Services
maxWidth="lg" </Typography>
sx={{ <Grid container spacing={3} justifyContent="center">
bgcolor: "#1a1a1a", // dark background {serviceList.map((s) => (
borderRadius: 3, <Paper
p: 3, key={s.name}
boxShadow: 6, elevation={3}
}} sx={{ p: 2, textAlign: "center", bgcolor: "#2d2d2d", borderRadius: 2 }}
> >
<Typography <Link
variant="h5" href={s.url}
align="center" target={s.external ? "_blank" : undefined}
sx={{color: "warning.main", mt: 4, mb: 2}} rel="noopener"
> underline="none"
Core Services sx={{ fontSize: 18, fontWeight: "bold", color: "success.main" }}
</Typography> >
<Grid container spacing={3} justifyContent="center"> {s.name}
{services.core.map((s) => ( </Link>
<Paper <Typography variant="body2" sx={{ mt: 1, color: "#ccc" }}>
elevation={3} {s.desc}
sx={{ </Typography>
p: 2, </Paper>
textAlign: "center", ))}
bgcolor: "#2d2d2d", </Grid>
borderRadius: 2, </React.Fragment>
}} ))}
> </Container>
<Link </Box>
href={s.url} </Box>
target={s.external ? "_blank" : undefined} </Container>
rel="noopener" );
underline="none"
sx={{fontSize: 18, fontWeight: "bold", color: "success.main"}}
>
{s.name}
</Link>
<Typography variant="body2" sx={{mt: 1, color: "#ccc"}}>
{s.desc}
</Typography>
</Paper>
))}
</Grid>
<Typography
variant="h5"
align="center"
sx={{color: "warning.main", mt: 4, mb: 2}}
>
Media Services
</Typography>
<Grid container spacing={3} justifyContent="center">
{services.media.map((s) => (
<Paper
elevation={3}
sx={{
p: 2,
textAlign: "center",
bgcolor: "#2d2d2d",
borderRadius: 2,
}}
>
<Link
href={s.url}
target={s.external ? "_blank" : undefined}
rel="noopener"
underline="none"
sx={{fontSize: 18, fontWeight: "bold", color: "success.main"}}
>
{s.name}
</Link>
<Typography variant="body2" sx={{mt: 1, color: "#ccc"}}>
{s.desc}
</Typography>
</Paper>
))}
</Grid>
</Container>
</Box>
</Box>
</Container>
);
} }

13
docker-compose.yaml Normal file
View File

@@ -0,0 +1,13 @@
services:
homepage:
build:
context: .
dockerfile: Dockerfile
# network: host
container_name: homepage
image: apps/homepage:0.0.5
ports:
- "3001:3000" # map host port 3000 to container
environment:
NODE_ENV: production
restart: unless-stopped

View File

@@ -1,5 +1,5 @@
{ {
"name": "material-ui-react-router-ts", "name": "homepage",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {