-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
77 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
node_modules/ | ||
.github/ | ||
.idea/ | ||
.vscode/ | ||
# Node modules | ||
node_modules | ||
npm-debug.log | ||
|
||
# Build artifacts | ||
.next | ||
out | ||
|
||
# Local environment files | ||
.env | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# IDE and editor files | ||
.vscode | ||
.idea | ||
*.swp | ||
*.swo | ||
|
||
# Operating system files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Git files | ||
.git | ||
.gitignore | ||
|
||
# Other files you may want to ignore | ||
coverage | ||
test-results | ||
*.tgz |
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,19 @@ | ||
#!/bin/sh | ||
|
||
# Log that the script is running | ||
echo "Running docker-entrypoint.sh." | ||
|
||
# Replace placeholder with actual environment variable values | ||
if [ -n "$BASE_PATH" ]; then | ||
echo "Replacing BASE_PATH in env.template.js with ${BASE_PATH}" | ||
sed -i "s|/__BASE_PATH__|${BASE_PATH}|g" /app/env.js | ||
else | ||
echo "BASE_PATH is not set." | ||
fi | ||
|
||
# Log the contents of env.template.js after modification | ||
echo "Contents of env.template.js after replacement:" | ||
cat /app/env.js | ||
|
||
# Start the application | ||
echo "Starting the application..." |
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 @@ | ||
module.exports = { | ||
basePath: "/kratos-ui" | ||
} |
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,13 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const envConfig = require("./env.js") // Load the generated config | ||
|
||
module.exports = { | ||
reactStrictMode: true, | ||
basePath: process.env.BASE_PATH || "", | ||
assetPrefix: process.env.BASE_PATH ?? "" + "/", | ||
|
||
// Set basePath and assetPrefix dynamically | ||
basePath: envConfig.basePath || "", | ||
assetPrefix: `${envConfig.basePath}/` || "", | ||
|
||
publicRuntimeConfig: { | ||
basePath: envConfig.basePath || "", | ||
}, | ||
} |
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