REFACTOR(repo): simplify project structure

- Move services/nextjs/ to nextjs/
- Move Dockerfile.prod to Dockerfile at root
- Remove deploy/ folder (K8s manifests moved to K3S-HOME/web-apps)
- Remove .gitea/ workflows
- Update GitHub Actions for new structure
- Remove develop branch triggers
This commit is contained in:
2026-01-05 02:00:36 +09:00
parent 8f6595a74a
commit 1fbd0467bd
53 changed files with 17 additions and 1050 deletions

View File

@@ -0,0 +1,5 @@
"use client"
export default function Error(){
return <h1>Something broke...</h1>
}

View File

@@ -0,0 +1,3 @@
export default function Loading() {
return <h2>Loading a movie :id</h2>;
}

View File

@@ -0,0 +1,26 @@
import { Suspense } from "react";
import MovieInfo from "@/components/movie-info";
import VideosInfo from "@/components/movie-videos";
import { getMovie } from "@/components/movie-info";
interface Iparams {
params: { id: string };
}
export async function generateMetadata({ params: { id } }: Iparams) {
const movie = await getMovie(id);
return { title: movie.title };
}
export default async function MovieDetail({ params: { id } }: Iparams) {
return (
<div>
<Suspense fallback={<h1>Loading movie info</h1>}>
<MovieInfo id={id} />
</Suspense>
<Suspense fallback={<h1>Loading videos info</h1>}>
<VideosInfo id={id} />
</Suspense>
</div>
);
}

View File

@@ -0,0 +1,3 @@
export default function AboutUs(){
return <div>Practice app for K8s/argoCD/Grafana</div>
}

BIN
nextjs/app/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

18
nextjs/app/layout.tsx Normal file
View File

@@ -0,0 +1,18 @@
import "../styles/global.css";
import React from "react";
import Navigation from "@/components/navigation";
export const metadata = {
title: "movieClone",
};
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<Navigation></Navigation>
{children}
</body>
</html>
);
}

30
nextjs/app/page.tsx Normal file
View File

@@ -0,0 +1,30 @@
import styles from "../styles/home.module.css";
import Movie from "@/components/movie";
const URL = "https://nomad-movies.nomadcoders.workers.dev/movies";
export const metadata = {
title: "Jovies",
};
async function getMovies() {
const response = await fetch(URL);
const json = await response.json();
return json;
}
export default async function HomePage() {
const movies = await getMovies();
return (
<div className={styles.container}>
{movies.map((movie: any) => (
<Movie
key={movie.id}
id={movie.id}
poster_path={movie.poster_path}
title={movie.title}
></Movie>
))}
</div>
);
}