From 60dc57ddf7f3e86eabf4c74596c0d50f845c3986 Mon Sep 17 00:00:00 2001 From: gibbyb Date: Fri, 20 Mar 2026 18:34:33 -0500 Subject: [PATCH] Update last minute things before rebuilding --- .dockerignore | 49 ++++++++++++++++++++++++++++++++++++++++ apps/next/next.config.js | 2 +- apps/next/src/env.js | 4 +++- docker/.dockerignore | 5 ++-- docker/.env.example | 8 ++----- docker/compose.yml | 4 +--- 6 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..680bb19 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,49 @@ +# Dependencies - MUST exclude these +node_modules +**/node_modules +.pnp +.pnp.js + +# Turbo +.turbo +**/.turbo + +# Next.js build artifacts +.next +**/.next +out +**/out + +# Development +.git +.gitignore +*.log +.env +.env.* +!.env.example +.vscode +.idea + +# Tests +**/__tests__ +**/*.test.ts +**/*.test.tsx +**/*.spec.ts + +# Build artifacts +dist +**/dist +build +**/build + +# Convex local +packages/backend/.convex + +# OS +.DS_Store +Thumbs.db + +# Docker +docker +Dockerfile +.dockerignore diff --git a/apps/next/next.config.js b/apps/next/next.config.js index b18f7d3..a73af29 100644 --- a/apps/next/next.config.js +++ b/apps/next/next.config.js @@ -35,7 +35,7 @@ const sentryConfig = { sentryUrl: env.NEXT_PUBLIC_SENTRY_URL, authToken: env.SENTRY_AUTH_TOKEN, // Only print logs for uploading source maps in CI - silent: !env.CI, + silent: 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) diff --git a/apps/next/src/env.js b/apps/next/src/env.js index 1a56008..7672d11 100644 --- a/apps/next/src/env.js +++ b/apps/next/src/env.js @@ -1,11 +1,13 @@ import { createEnv } from '@t3-oss/env-nextjs'; import { z } from 'zod/v4'; +import { process } from 'zod/v4/core'; export const env = createEnv({ shared: { NODE_ENV: z .enum(['development', 'production', 'test']) .default('development'), + CI: z.boolean().default(false), }, /** * Specify your server-side environment variables schema here. @@ -34,7 +36,7 @@ export const env = createEnv({ experimental__runtimeEnv: { NODE_ENV: process.env.NODE_ENV, CI: process.env.CI, - SITE_URL: process.env.SITE_URL, + SENTRY_AUTH_TOKEN: process.env.SENTRY_AUTH_TOKEN, NEXT_PUBLIC_SITE_URL: process.env.NEXT_PUBLIC_SITE_URL, NEXT_PUBLIC_CONVEX_URL: process.env.NEXT_PUBLIC_CONVEX_URL, NEXT_PUBLIC_PLAUSIBLE_URL: process.env.NEXT_PUBLIC_PLAUSIBLE_URL, diff --git a/docker/.dockerignore b/docker/.dockerignore index 4db28d5..680bb19 100644 --- a/docker/.dockerignore +++ b/docker/.dockerignore @@ -18,8 +18,9 @@ out .git .gitignore *.log -.env.local -.env*.local +.env +.env.* +!.env.example .vscode .idea diff --git a/docker/.env.example b/docker/.env.example index 4c5440a..9a8fc9f 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,13 +1,9 @@ # Next Envrionment Variables -NODE_ENV=production NETWORK=nginx-bridge NEXT_CONTAINER_NAME=next-app NEXT_DOMAIN_NAME=gbrown.org -# Port is disabled by default as suggested -# config is to have reverse proxy on the same -# network so you can just forward to the -# port on the internal network. -# NEXT_PORT=3000 + NEXT_PORT=3000 +NODE_ENV=production SENTRY_AUTH_TOKEN= NEXT_PUBLIC_SITE_URL=https://gbrown.org NEXT_PUBLIC_CONVEX_URL=https://api.convex.gbrown.org diff --git a/docker/compose.yml b/docker/compose.yml index d5f9977..a4f8814 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -9,8 +9,8 @@ services: dockerfile: ./docker/Dockerfile image: ${NEXT_CONTAINER_NAME}:alpine container_name: ${NEXT_CONTAINER_NAME} - env_file: [.env] environment: + - NODE_ENV - SENTRY_AUTH_TOKEN - NEXT_PUBLIC_SITE_URL - NEXT_PUBLIC_CONVEX_URL @@ -38,7 +38,6 @@ services: #ports: ['${BACKEND_PORT:-3210}:3210','${SITE_PROXY_PORT:-3211}:3211'] volumes: [./data:/convex/data] labels: ['com.centurylinklabs.watchtower.enable=true'] - env_file: ['.env'] environment: - INSTANCE_NAME - INSTANCE_SECRET @@ -67,7 +66,6 @@ services: #user: 1000:1000 #ports: ['${DASHBOARD_PORT:-6791}:6791'] labels: ['com.centurylinklabs.watchtower.enable=true'] - env_file: [.env] environment: - NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-http://${BACKEND_CONTAINER_NAME:-convex-backend}:${PORT:-3210}} depends_on: