Skip to content

Commit 934ece0

Browse files
authored
Merge branch 'main' into yara-new-asset
2 parents 2c2e133 + 4e3733b commit 934ece0

488 files changed

Lines changed: 56965 additions & 13 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.next/cache
3+
.git
4+
docs
5+
*.md
6+
.env*
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Copyright (c) 2026 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
26+
The above copyright notice and either this complete permission notice or at a
27+
minimum a reference to the UPL must be included in all copies or substantial
28+
portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.

ai/gen-ai-agents/oci-enterprise-ai-chat/README.md

Lines changed: 438 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.next/cache
3+
.git
4+
docs
5+
*.md
6+
.env*
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM node:22-alpine
2+
3+
WORKDIR /app
4+
5+
# Copy pre-built standalone output (built locally with npm run build)
6+
COPY .next/standalone ./
7+
COPY .next/static ./.next/static
8+
COPY public ./public
9+
10+
COPY entrypoint.sh /entrypoint.sh
11+
RUN chmod +x /entrypoint.sh
12+
13+
ENV PORT=8080
14+
ENV HOSTNAME=0.0.0.0
15+
16+
EXPOSE 8080
17+
18+
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
19+
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:8080/ready || exit 1
20+
21+
CMD ["/entrypoint.sh"]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
set -e
3+
4+
PLACEHOLDER="/__BASE_PATH_PLACEHOLDER__"
5+
PREFIX="${BASE_PATH:-}"
6+
PREFIX="${PREFIX%/}"
7+
ESCAPED=$(printf '%s' "$PREFIX" | sed 's/[\/&|]/\\&/g')
8+
9+
# OCI Hosted Deployments mounts the container filesystem as read-only
10+
# except /tmp. Copy the app to /tmp so we can sed the placeholder.
11+
echo "[entrypoint] Staging app in /tmp/app (OCI fs is read-only outside /tmp)..."
12+
mkdir -p /tmp/app
13+
cp -r /app/. /tmp/app/
14+
cd /tmp/app
15+
16+
echo "[entrypoint] Replacing ${PLACEHOLDER} with '${PREFIX}' in built assets..."
17+
find ./server.js ./.next ./public -type f \
18+
\( -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.rsc" -o -name "*.css" \) \
19+
-exec sed -i "s|${PLACEHOLDER}|${ESCAPED}|g" {} +
20+
21+
echo "[entrypoint] Done. Starting Next.js server from /tmp/app..."
22+
exec node server.js
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [...compat.extends("next/core-web-vitals")];
13+
14+
export default eslintConfig;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Custom image loader for next/image. In Next 16, neither assetPrefix nor
2+
// `unoptimized: true` consistently prepend the base path to image URLs.
3+
// This loader prepends the BASE_PATH placeholder, which the container's
4+
// entrypoint rewrites at startup using the BASE_PATH env var.
5+
export default function imageLoader({ src }) {
6+
return `/__BASE_PATH_PLACEHOLDER__${src}`;
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
}
7+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const isProd = process.env.NODE_ENV === 'production';
2+
3+
/** @type {import('next').NextConfig} */
4+
const nextConfig = {
5+
devIndicators: false,
6+
output: 'standalone',
7+
compress: false,
8+
// Placeholder is only baked in production builds. The container's entrypoint
9+
// replaces it with the real BASE_PATH env var at runtime. In dev (`next dev`),
10+
// we skip it so everything works against localhost without needing the sed.
11+
...(isProd && { assetPrefix: '/__BASE_PATH_PLACEHOLDER__' }),
12+
images: {
13+
...(isProd && { loader: 'custom', loaderFile: './imageLoader.js' }),
14+
dangerouslyAllowSVG: true,
15+
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
16+
},
17+
};
18+
19+
export default nextConfig;

0 commit comments

Comments
 (0)