-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
caa77b7
commit a33d686
Showing
40 changed files
with
1,259 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Dependency directories | ||
node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Testing | ||
/coverage | ||
|
||
# Production | ||
/build | ||
|
||
# Misc | ||
.DS_Store | ||
*.pem | ||
|
||
# Debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Local env files | ||
.env*.local | ||
|
||
# Vercel | ||
.vercel | ||
|
||
# TypeScript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# IDE/Editor folders | ||
.idea | ||
.vscode | ||
|
||
# OS generated files | ||
Thumbs.db | ||
|
||
# Temporary files | ||
*.swp | ||
*.swo | ||
|
||
# Git related | ||
.git | ||
.gitignore | ||
|
||
# Docker related | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Other | ||
README.md | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
FROM node:20.15.1-slim | ||
WORKDIR /data | ||
COPY . . | ||
RUN npm install | ||
CMD [ "/bin/bash -c 'npm run dev'" ] | ||
# Copyright The OpenTelemetry Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
FROM node:20 AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY ./src/flagd-ui/package*.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY ./src/flagd-ui/. ./ | ||
|
||
RUN npm run build | ||
|
||
# ----------------------------------------------------------------------------- | ||
|
||
FROM node:20-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY ./src/flagd-ui/package*.json ./ | ||
|
||
RUN npm ci --only=production | ||
|
||
COPY --from=builder /app/src/instrumentation.ts ./instrumentation.ts | ||
COPY --from=builder /app/next.config.mjs ./next.config.mjs | ||
|
||
COPY --from=builder /app/.next ./.next | ||
|
||
EXPOSE 4000 | ||
|
||
CMD ["npm", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,21 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
## Getting Started | ||
|
||
First, run the development server: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
# Flagd-ui | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
This application provides a user interface for configuring the feature flags of the flagd service. | ||
|
||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
## Learn More | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
## Running the application | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
The application can be run with the rest of the demo using the documented docker compose or make commands. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
## Local development | ||
|
||
## Deploy on Vercel | ||
To run the app locally for development you must copy `src/flagd/demo.flagd.json` into `src/flagd-ui/data/demo.flagd.json` | ||
(create the directory and file if they do not exist yet). Make sure you're in the `src/flagd-ui` directory and run | ||
the following command: | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
Then you must navigate to `localhost:4000/feature`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = {}; | ||
const nextConfig = { | ||
experimental: { | ||
instrumentationHook: true, | ||
}, | ||
basePath: "/feature", | ||
}; | ||
|
||
export default nextConfig; |
Oops, something went wrong.