Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agenta web enhancements #2170

Merged
merged 41 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c8607fd
Remove all unused dependencies
aakrem Oct 14, 2024
bd03a96
add sentry
aakrem Oct 14, 2024
637a707
put back used libraries
aakrem Oct 14, 2024
566ca30
not used libraries and code
aakrem Oct 14, 2024
c385ae2
add a .dockerignore
aakrem Oct 14, 2024
5c890bf
remove multistage in dev
aakrem Oct 14, 2024
65d82de
remove tips
aakrem Oct 14, 2024
d26481a
remove mdx
aakrem Oct 14, 2024
63f8160
fix export
aakrem Oct 14, 2024
3817d6b
update nextjs
aakrem Oct 14, 2024
f3c6c31
update nextjs
aakrem Oct 14, 2024
01704d0
use a latest lts node version
aakrem Oct 15, 2024
d71317c
use latest lts for node
aakrem Oct 15, 2024
f2734c3
remove collecting data
aakrem Oct 18, 2024
eb3c2ef
merge main
aakrem Nov 1, 2024
ef1691f
put back original format for app selector
aakrem Nov 1, 2024
94ce2c8
remove removing a line
aakrem Nov 1, 2024
c2ca65d
simple prod Dockerfile
aakrem Nov 1, 2024
8e3c96b
remove tips
aakrem Nov 1, 2024
e33dde7
fixed prettier(frontend)
bekossy Nov 10, 2024
bfaadb3
Merge branch 'main' into agenta-web-enhancements
bekossy Nov 10, 2024
1020c40
fix(frontend): lint fix and installed postcss
bekossy Nov 10, 2024
9d5695f
fix(frontend): removed CardGrid and ContentSpinner components
bekossy Nov 10, 2024
78b1e85
fix conflicts
aakrem Nov 12, 2024
e193faa
fix packages
aakrem Nov 12, 2024
27ec79f
fix(frontend): restored content spinner component
bekossy Nov 12, 2024
2d205d8
Merge branch 'main' into agenta-web-enhancements
ardaerzin Dec 11, 2024
69f1207
chore(frontend): update package lock
ardaerzin Dec 11, 2024
46160c5
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 12, 2024
ec957cf
enhance(frontend): improve dependency versions
ardaerzin Dec 12, 2024
f5c4390
fix(frontend): typescript issue fix
ardaerzin Dec 12, 2024
94e6191
chore(frontend): move eslint deps from dev
ardaerzin Dec 12, 2024
ffe0733
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 16, 2024
02c1834
feat: add @lobehub/fluent-emoji to transpilePackages in next.config.j…
ardaerzin Dec 16, 2024
afc071b
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 18, 2024
02cb133
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 18, 2024
2eca2a9
chore(frontend): updates lock
ardaerzin Dec 18, 2024
25818b9
fix(frontend): revert changes to prod.Dockerfile
ardaerzin Dec 18, 2024
5426d47
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 19, 2024
2b83fe0
chore(frontend): updates lock
ardaerzin Dec 19, 2024
7b584af
Merge branch 'dev' into agenta-web-enhancements
ardaerzin Dec 19, 2024
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.git
41 changes: 11 additions & 30 deletions agenta-web/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,46 +1,27 @@
FROM node:22-alpine3.18 AS base
FROM node:20.18-slim

WORKDIR /app

# Install dependencies based on the preferred package manager
# Copy only package.json and lock files first to leverage Docker layer caching
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./

# Install dependencies based on the available lock file
RUN \
if [ -f yarn.lock ]; then yarn install --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm install; \
if [ -f yarn.lock ]; then yarn install; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm install; \
else yarn install; \
fi

# Copy only the necessary files for development
COPY src ./src
COPY public ./public
COPY next.config.js .
COPY tsconfig.json .
COPY postcss.config.js .
COPY tailwind.config.ts .
COPY .env .
COPY sentry.* .

# Stage 2: Development Stage
FROM node:22-alpine3.18 AS dev

WORKDIR /app

# Copy dependencies and application files from the base stage
COPY --from=base /app /app
# Copy the rest of the application code
COPY . .

# Install development dependencies
RUN \
if [ -f yarn.lock ]; then yarn install; \
elif [ -f package-lock.json ]; then npm install; \
elif [ -f pnpm-lock.yaml ]; then pnpm install; \
else yarn install; \
fi
RUN npx next telemetry disable

# Expose the necessary ports
# Expose the necessary port
EXPOSE 3000

# Start Next.js in development mode based on the preferred package manager
# Start Next.js in development mode
CMD \
if [ -f yarn.lock ]; then yarn dev; \
elif [ -f package-lock.json ]; then npm run dev; \
Expand Down
14 changes: 3 additions & 11 deletions agenta-web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
const withMDX = require("@next/mdx")({
extension: /\.mdx?$/,
options: {
remarkPlugins: [],
rehypePlugins: [],
},
})

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
Expand All @@ -25,7 +17,7 @@ const nextConfig = {
],
swcMinify: true,
images: {
remotePatterns: [{hostname: "fps.cdnpk.net"}],
remotePatterns: [{ hostname: "fps.cdnpk.net" }],
},

async redirects() {
Expand All @@ -38,7 +30,7 @@ const nextConfig = {
]
},

webpack: (config, {webpack, isServer}) => {
webpack: (config, { webpack, isServer }) => {
const envs = {}

Object.keys(process.env).forEach((env) => {
Expand All @@ -59,4 +51,4 @@ const nextConfig = {
},
}

module.exports = withMDX(nextConfig)
module.exports = nextConfig
Loading
Loading