Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Dependencies
node_modules
npm-debug.log*

# Next.js build output
.next
out

# Environment files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# IDE files
.vscode
.idea
*.swp
*.swo
*~

# Git
.git
.gitignore

# OS files
.DS_Store
Thumbs.db

# Testing
coverage
.nyc_output

# Build artifacts
dist
build

38 changes: 26 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
# Use the official Node.js 18 image as the base image
FROM node:18
# Use the official Node.js 24 image as the base image
FROM node:24-alpine AS base

# Set the working directory inside the container
# Install dependencies only when needed
FROM base AS deps
WORKDIR /app

# Copy package.json files first for caching layer purposes
COPY package.json ./
# Copy package files
COPY package.json package-lock.json* ./

# Install dependencies
RUN npm install
RUN npm ci

# Copy the rest of the application files to the working directory
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Build the Next.js application
ENV NEXT_PUBLIC_ENVIRONMENT=production
RUN npm run build

# Expose the port that the Next.js app will run on
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production

# Copy the built static files from the builder stage
COPY --from=builder /app/out ./out

# Expose the port
EXPOSE 3000

# Set the environment variable in the .env.local file
RUN echo "NEXT_PUBLIC_ENVIRONMENT=development" > .env.local
# Since this is a static export, we'll use serve to serve the static files
RUN npm install -g serve

# Start the Next.js application
CMD ["npm", "run", "dev"]
# Start the server
CMD ["serve", "-s", "out", "-l", "3000"]
9 changes: 5 additions & 4 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import styles from '../../styles/About.module.css';
export const metadata = {
title: 'About RogueApps',
description: 'Learn more about RogueApps.',
viewport: {
width: 'device-width',
initialScale: 1,
},
};

export const viewport = {
width: 'device-width',
initialScale: 1,
themeColor: '#00f49c',
};

Expand Down
4 changes: 2 additions & 2 deletions app/components/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default function Callout() {
<p className={styles.calloutText}>
Help us document emerging OAuth application tradecraft. If you've ever seen a RogueApp in the wild, please contribute to the project!
</p>
<Link href="/contribute" legacyBehavior>
<a className={styles.calloutButton}>Contribute</a>
<Link href="/contribute" className={styles.calloutButton}>
Contribute
</Link>
</div>
);
Expand Down
11 changes: 6 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ import '../styles/globals.css';
export const metadata = {
title: 'RogueApps',
description: 'RogueApps: when good OAuth apps go rogue.',
viewport: {
width: 'device-width',
initialScale: 1,
},
keywords: 'OAuth, security, rogue apps, Huntress',
robots: 'index, follow',
themeColor: '#00f49c',
icons: {
icon: 'https://raw.githubusercontent.com/huntresslabs/rogueapps/main/public/favicon.ico',
},
Expand All @@ -34,6 +29,12 @@ export const metadata = {
},
};

export const viewport = {
width: 'device-width',
initialScale: 1,
themeColor: '#00f49c',
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
Expand Down
3 changes: 2 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading