Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --build-arg NEXT_PUBLIC_SENTRY_DSN="${NEXT_PUBLIC_SENTRY_DSN}" --build-arg SENTRY_AUTH_TOKEN="${SENTRY_AUTH_TOKEN}"
- run: flyctl deploy"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
NEXT_PUBLIC_SENTRY_DSN: ${{ secrets.NEXT_PUBLIC_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ yarn-error.log*
next-env.d.ts
.env

# Sentry Config File
.env.sentry-build-plugin
# Postgresql
postgresql
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ ARG NODE_VERSION=22

FROM node:${NODE_VERSION}-slim AS base

LABEL fly_launch_runtime="Next.js/Prisma"

# Next.js/Prisma app lives here
WORKDIR /app

Expand All @@ -17,10 +15,6 @@ ENV NODE_ENV="production"
# Throw-away build stage to reduce size of final image
FROM base as build

ARG NEXT_PUBLIC_SENTRY_DSN=
ARG SENTRY_AUTH_TOKEN=
ENV NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN} SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}

# Install packages needed to build node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp openssl pkg-config python-is-python3 ca-certificates
Expand Down
23 changes: 0 additions & 23 deletions Dockerfile.dev

This file was deleted.

38 changes: 24 additions & 14 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
version: '3.8'
services:
jqplay:
build:
context: .
dockerfile: Dockerfile.dev
dockerfile: Dockerfile
container_name: jqplay
environment:
NODE_ENV: development
DATABASE_URL: postgres://postgres:postgres@pg:5432/jqplay
command: >
sh -c "npx prisma migrate dev && npm run dev"

HOSTNAME: "0.0.0.0"
PORT: 7500
command: sh -c "prisma migrate dev && node server.js"
ports:
- "3000:3000"
- "127.0.0.1:7500:7500"
networks:
- jq-network
- bridge
depends_on:
pg:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
- /app/.next
restart: unless-stopped
# restart: unless-stopped

pg:
image: postgres:16
container_name: pg
Expand All @@ -31,8 +30,19 @@ services:
POSTGRES_DB: jqplay
ports:
- "5432:5432"
networks:
- jq-network
volumes:
- ./postgresql:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
test: ["CMD-SHELL", "pg_isready -U postgres -d jqplay"]
interval: 2s
retries: 5
start_period: 10s
timeout: 10s

networks:
jq-network:
internal: true
bridge:
driver: bridge
Binary file added db.sqlite3
Binary file not shown.
45 changes: 0 additions & 45 deletions instrumentation-client.ts

This file was deleted.

21 changes: 0 additions & 21 deletions instrumentation.ts

This file was deleted.

76 changes: 21 additions & 55 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,60 +1,26 @@
import { withSentryConfig } from '@sentry/nextjs';
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
webpack: (config, { isServer }) => {
config.resolve.fallback = {
fs: false,
path: false,
crypto: false
};

if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ['json', 'plaintext'],
filename: 'static/[name].worker.js', // Make sure this matches the output path in Next.js
})
);
}

return config;
},
output: "standalone",
webpack: (config, { isServer }) => {
config.resolve.fallback = {
fs: false,
path: false,
crypto: false,
};

if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ["json"],
filename: "static/[name].worker.js", // Make sure this matches the output path in Next.js
})
);
}

return config;
},
};

export default withSentryConfig(nextConfig, {
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options

org: "jqplay-org",
project: "jqplay-org",

// 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,

// 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,
});
export default nextConfig;
Loading
Loading