-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add next app * added sentry .env file to gitignore * Delete next/.env.sentry-build-plugin --------- Co-authored-by: Aidan Landen <[email protected]> Co-authored-by: Aidan Landen <[email protected]>
- Loading branch information
1 parent
e8c8183
commit 8550051
Showing
113 changed files
with
30,398 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules |
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,35 @@ | ||
|
||
# This file specifies files that are *not* uploaded to Google Cloud Platform | ||
# using gcloud. It follows the same syntax as .gitignore, with the addition of | ||
# "#!include" directives (which insert the entries of the given .gitignore-style | ||
# file at that point). | ||
# | ||
# For more information, run: | ||
# $ gcloud topic gcloudignore | ||
# | ||
.gcloudignore | ||
# If you would like to upload your .git directory, .gitignore file or files | ||
# from your .gitignore file, remove the corresponding line | ||
# below: | ||
.git | ||
.gitignore | ||
|
||
# Python pycache: | ||
__pycache__/ | ||
# Ignored by the build system | ||
/setup.cfg | ||
|
||
|
||
env | ||
env/ | ||
.env | ||
**/.env | ||
|
||
**/.virtualenv | ||
|
||
node_modules/ | ||
**/node_modules | ||
|
||
flask/ | ||
tests/ | ||
README.md |
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,2 @@ | ||
engine-strict=true | ||
|
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 @@ | ||
/.next | ||
dist | ||
node_modules |
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,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
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,32 @@ | ||
FROM node:18-buster-slim | ||
|
||
RUN : \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
# for envsusbst | ||
gettext \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN npm install -g serve | ||
|
||
WORKDIR /src | ||
COPY package.json package-lock.json . | ||
RUN npm install | ||
|
||
COPY . . | ||
|
||
RUN \ | ||
REACT_APP_DSN=http://react@localhost:9989/2 \ | ||
REACT_APP_RELEASE=2023+compose \ | ||
SENTRY_AUTH_TOKEN=ignored \ | ||
REACT_APP_ASPNETCORE_BACKEND=http://localhost:8091 \ | ||
REACT_APP_EXPRESS_BACKEND=http://localhost:8088 \ | ||
REACT_APP_FLASK_BACKEND=http://localhost:8080 \ | ||
REACT_APP_LARAVEL_BACKEND=http://localhost:8000 \ | ||
REACT_APP_RUBYONRAILS_BACKEND=http://localhost:5000 \ | ||
REACT_APP_RUBY_BACKEND=http://localhost:4567 \ | ||
REACT_APP_SPRINGBOOT_BACKEND=http://localhost:8090 \ | ||
./build.sh | ||
|
||
CMD ["serve", "-s", "build"] |
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,7 @@ | ||
## About | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
|
||
## Deploy | ||
|
||
See [../README.md](../README.md) |
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,16 @@ | ||
|
||
env: standard | ||
service: <SERVICE> | ||
runtime: nodejs18 | ||
|
||
handlers: | ||
- url: /static | ||
static_dir: build/static | ||
- url: /(.*\.(json|ico|js|png))$ | ||
static_files: build/\1 | ||
upload: build/.*\.(json|ico|js|png)$ | ||
- url: .* | ||
static_files: build/index.html | ||
upload: build/index.html | ||
http_headers: | ||
Document-Policy: js-profiling |
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,14 @@ | ||
#!/bin/bash | ||
|
||
# Usage: ./build.sh | ||
|
||
set -e # exit immediately if any command exits with a non-zero status | ||
|
||
envsubst < config-overrides.js.template > config-overrides.js | ||
|
||
rm -rf build | ||
# npm ci does not update minor versions -> | ||
# (1) less chance of breaking (2) less noise in PR from package-lock.json | ||
npm ci | ||
npm run dev # defined in 'scripts' in package.json | ||
|
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,25 @@ | ||
const SentryWebpackPlugin = require('@sentry/webpack-plugin'); | ||
const reactsourceMapPlugin = require('@acemarke/react-prod-sourcemaps'); | ||
|
||
module.exports = function override(config, env) { | ||
//do stuff with the webpack config... | ||
config.plugins.push( | ||
reactsourceMapPlugin.WebpackReactSourcemapsPlugin({ | ||
mode: 'strict', | ||
}) | ||
); | ||
|
||
config.plugins.push( | ||
SentryWebpackPlugin.sentryWebpackPlugin({ | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
include: '.', | ||
org: 'team-se', | ||
project: 'aidan-react-local', | ||
ignoreFile: '.sentrycliignore', | ||
ignore: ['webpack.config.js'], | ||
configFile: 'sentry.properties', | ||
reactComponentAnnotation: { enabled: true }, | ||
}) | ||
); | ||
return config; | ||
}; |
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,25 @@ | ||
const SentryWebpackPlugin = require('@sentry/webpack-plugin'); | ||
const reactsourceMapPlugin = require('@acemarke/react-prod-sourcemaps'); | ||
|
||
module.exports = function override(config, env) { | ||
//do stuff with the webpack config... | ||
config.plugins.push( | ||
reactsourceMapPlugin.WebpackReactSourcemapsPlugin({ | ||
mode: 'strict', | ||
}) | ||
); | ||
|
||
config.plugins.push( | ||
SentryWebpackPlugin.sentryWebpackPlugin({ | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
include: '.', | ||
org: '${SENTRY_ORG}', | ||
project: '${REACT_SENTRY_PROJECT}', | ||
ignoreFile: '.sentrycliignore', | ||
ignore: ['webpack.config.js'], | ||
configFile: 'sentry.properties', | ||
reactComponentAnnotation: {enabled:true}, | ||
}) | ||
); | ||
return config; | ||
}; |
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 @@ | ||
import config from 'eslint-config-prettier'; | ||
|
||
export default [...[].concat(config)]; |
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,45 @@ | ||
import { withSentryConfig } from '@sentry/nextjs'; | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
distDir: './dist', // Changes the build output directory to `./dist/`. | ||
}; | ||
|
||
export default withSentryConfig(nextConfig, { | ||
// For all available options, see: | ||
// https://github.com/getsentry/sentry-webpack-plugin#options | ||
|
||
org: 'aidans-test-org', | ||
project: 'javascript-nextjs', | ||
|
||
// Only print logs for uploading source maps in CI | ||
silent: !process.env.CI, | ||
|
||
// For all available options, see: | ||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ | ||
|
||
// Upload a larger set of source maps for prettier stack traces (increases build time) | ||
widenClientFileUpload: true, | ||
|
||
// Automatically annotate React components to show their full name in breadcrumbs and session replay | ||
reactComponentAnnotation: { | ||
enabled: true, | ||
}, | ||
|
||
// Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers. | ||
// This can increase your server load as well as your hosting bill. | ||
// Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client- | ||
// side errors will fail. | ||
// tunnelRoute: "/monitoring", | ||
|
||
// Hides source maps from generated client bundles | ||
hideSourceMaps: true, | ||
|
||
// Automatically tree-shake Sentry logger statements to reduce bundle size | ||
disableLogger: true, | ||
|
||
// Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.) | ||
// See the following for more information: | ||
// https://docs.sentry.io/product/crons/ | ||
// https://vercel.com/docs/cron-jobs | ||
automaticVercelMonitors: true, | ||
}); |
Oops, something went wrong.