From 78809a3d68fcf216c5c31089160412edad487900 Mon Sep 17 00:00:00 2001 From: Max Proske Date: Tue, 14 Jun 2022 04:13:55 -0700 Subject: [PATCH] Add with-docker-compose example (#32668) `with-docker-compose` contains everything needed to get Next.js up and running with Docker Compose. This example aims to provide an easy-to-use, Next.js app development and production environment, **all without Node.js being installed** on the host machine. This ensures a consistent development environment across Windows, MacOS, and Linux teams. I was inspired to create this, because the existing [with-docker](https://github.com/vercel/next.js/tree/canary/examples/with-docker) example only uses Docker to build the final production artifacts, not provide a development environment. Docker Compose easily syncs changes with containers for Hot Reloading, parallel builds, and networking, making it a powerful and consistent development tool. Developers can **easily extend this example** by modifying the YAML files to include Nginx, Postgres, and other Docker images. This example takes advantage of Docker multistage builds combined with the Next 12.1 [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental) feature, to create up to **80% smaller apps** (Approximately 110 MB compared to 1 GB with create-next-app). I also included an example without multistage builds, for developers who don't want to get into the weeds. I have been tweaking this Docker Compose setup over 3 years of real world use, but please let me know if anything can be improved. --- examples/with-docker-compose/.dockerignore | 0 examples/with-docker-compose/.env | 5 + examples/with-docker-compose/.gitignore | 34 +++++ examples/with-docker-compose/README.md | 92 +++++++++++++ .../docker-compose.dev.yml | 27 ++++ ...docker-compose.prod-without-multistage.yml | 24 ++++ .../docker-compose.prod.yml | 24 ++++ .../with-docker-compose/next-app/.gitignore | 34 +++++ .../next-app/dev.Dockerfile | 15 ++ .../next-app/next-env.d.ts | 5 + .../next-app/next.config.js | 5 + .../with-docker-compose/next-app/package.json | 19 +++ .../prod-without-multistage.Dockerfile | 28 ++++ .../next-app/prod.Dockerfile | 57 ++++++++ .../next-app/public/favicon.ico | Bin 0 -> 15086 bytes .../next-app/public/vercel.svg | 4 + .../next-app/src/pages/_app.tsx | 6 + .../next-app/src/pages/index.tsx | 68 ++++++++++ .../next-app/src/styles/Home.module.css | 128 ++++++++++++++++++ .../next-app/src/styles/globals.css | 16 +++ .../next-app/tsconfig.json | 20 +++ 21 files changed, 611 insertions(+) create mode 100644 examples/with-docker-compose/.dockerignore create mode 100644 examples/with-docker-compose/.env create mode 100644 examples/with-docker-compose/.gitignore create mode 100644 examples/with-docker-compose/README.md create mode 100644 examples/with-docker-compose/docker-compose.dev.yml create mode 100644 examples/with-docker-compose/docker-compose.prod-without-multistage.yml create mode 100644 examples/with-docker-compose/docker-compose.prod.yml create mode 100644 examples/with-docker-compose/next-app/.gitignore create mode 100644 examples/with-docker-compose/next-app/dev.Dockerfile create mode 100644 examples/with-docker-compose/next-app/next-env.d.ts create mode 100644 examples/with-docker-compose/next-app/next.config.js create mode 100644 examples/with-docker-compose/next-app/package.json create mode 100644 examples/with-docker-compose/next-app/prod-without-multistage.Dockerfile create mode 100644 examples/with-docker-compose/next-app/prod.Dockerfile create mode 100644 examples/with-docker-compose/next-app/public/favicon.ico create mode 100644 examples/with-docker-compose/next-app/public/vercel.svg create mode 100644 examples/with-docker-compose/next-app/src/pages/_app.tsx create mode 100644 examples/with-docker-compose/next-app/src/pages/index.tsx create mode 100644 examples/with-docker-compose/next-app/src/styles/Home.module.css create mode 100644 examples/with-docker-compose/next-app/src/styles/globals.css create mode 100644 examples/with-docker-compose/next-app/tsconfig.json diff --git a/examples/with-docker-compose/.dockerignore b/examples/with-docker-compose/.dockerignore new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/examples/with-docker-compose/.env b/examples/with-docker-compose/.env new file mode 100644 index 0000000000000..e5aefd0235753 --- /dev/null +++ b/examples/with-docker-compose/.env @@ -0,0 +1,5 @@ +# DO NOT ADD SECRETS TO THIS FILE. This is a good place for defaults. +# If you want to add secrets use `.env.production.local` instead, which is automatically detected by docker-compose. + +ENV_VARIABLE=production_server_only_variable +NEXT_PUBLIC_ENV_VARIABLE=production_public_variable diff --git a/examples/with-docker-compose/.gitignore b/examples/with-docker-compose/.gitignore new file mode 100644 index 0000000000000..1437c53f70bc2 --- /dev/null +++ b/examples/with-docker-compose/.gitignore @@ -0,0 +1,34 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel diff --git a/examples/with-docker-compose/README.md b/examples/with-docker-compose/README.md new file mode 100644 index 0000000000000..9d8d8bd87b9e6 --- /dev/null +++ b/examples/with-docker-compose/README.md @@ -0,0 +1,92 @@ +# With Docker Compose + +This example contains everything needed to get a Next.js development and production environment up and running with Docker Compose. + +## Benfits of Docker Compose + +- Develop locally without Node.js or TypeScript installed ✨ +- Easy to run, consistent development environment across Mac, Windows, and Linux teams +- Run multiple Next.js apps, databases, and other microservices in a single deployment +- Multistage builds combined with [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental) outputs up to 85% smaller apps (Approximately 110 MB compared to 1 GB with create-next-app) +- BuildKit engine builds multiple Docker images in parallel +- Easy configuration with YAML files + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example: + +```bash +npx create-next-app --example with-docker-compose with-docker-compose-app +# or +yarn create next-app --example with-docker-compose with-docker-compose-app +# or +pnpm create next-app --example with-docker-compose with-docker-compose-app +``` + +## Prerequisites + +Install [Docker Desktop](https://docs.docker.com/get-docker) for Mac, Windows, or Linux. Docker Desktop includes Docker Compose as part of the installation. + +## Development + +First, run the development server: + +```bash +# Create a network, which allows containers to communicate +# with each other, by using their container name as a hostname +docker network create my_network + +# Build dev using new BuildKit engine +COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.dev.yml build --parallel + +# Up dev +docker-compose -f docker-compose.dev.yml up +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. + +## Production + +Multistage builds are highly recommended in production. Combined with the Next 12 [Output Standalone](https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental) feature, only `node_modules` files required for production are copied into the final Docker image. + +First, run the production server (Final image approximately 110 MB). + +```bash +# Create a network, which allows containers to communicate +# with each other, by using their container name as a hostname +docker network create my_network + +# Build prod using new BuildKit engine +COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.prod.yml build --parallel + +# Up prod in detached mode +docker-compose -f docker-compose.prod.yml up -d +``` + +Alternatively, run the production server without without multistage builds (Final image approximately 1 GB). + +```bash +# Create a network, which allows containers to communicate +# with each other, by using their container name as a hostname +docker network create my_network + +# Build prod without multistage using new BuildKit engine +COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker-compose.prod-without-multistage.yml build --parallel + +# Up prod without multistage in detached mode +docker-compose -f docker-compose.prod-without-multistage.yml up -d +``` + +Open [http://localhost:3000](http://localhost:3000). + +## Useful commands + +```bash +# Stop all running containers +docker kill $(docker ps -q) && docker rm $(docker ps -a -q) + +# Free space +docker system prune -af --volumes +``` diff --git a/examples/with-docker-compose/docker-compose.dev.yml b/examples/with-docker-compose/docker-compose.dev.yml new file mode 100644 index 0000000000000..71d23351e7192 --- /dev/null +++ b/examples/with-docker-compose/docker-compose.dev.yml @@ -0,0 +1,27 @@ +version: '3' + +services: + next-app: + container_name: next-app + build: + context: ./next-app + dockerfile: dev.Dockerfile + environment: + ENV_VARIABLE: ${ENV_VARIABLE} + NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} + volumes: + - ./next-app/src:/app/src + - ./next-app/public:/app/public + restart: always + ports: + - 3000:3000 + networks: + - my_network + + # Add more containers below (nginx, postgres, etc.) + +# Define a network, which allows containers to communicate +# with each other, by using their container name as a hostname +networks: + my_network: + external: true diff --git a/examples/with-docker-compose/docker-compose.prod-without-multistage.yml b/examples/with-docker-compose/docker-compose.prod-without-multistage.yml new file mode 100644 index 0000000000000..8732defdc778a --- /dev/null +++ b/examples/with-docker-compose/docker-compose.prod-without-multistage.yml @@ -0,0 +1,24 @@ +version: '3' + +services: + next-app: + container_name: next-app + build: + context: ./next-app + dockerfile: prod-without-multistage.Dockerfile + args: + ENV_VARIABLE: ${ENV_VARIABLE} + NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} + restart: always + ports: + - 3000:3000 + networks: + - my_network + + # Add more containers below (nginx, postgres, etc.) + +# Define a network, which allows containers to communicate +# with each other, by using their container name as a hostname +networks: + my_network: + external: true diff --git a/examples/with-docker-compose/docker-compose.prod.yml b/examples/with-docker-compose/docker-compose.prod.yml new file mode 100644 index 0000000000000..adfb425d9894c --- /dev/null +++ b/examples/with-docker-compose/docker-compose.prod.yml @@ -0,0 +1,24 @@ +version: '3' + +services: + next-app: + container_name: next-app + build: + context: ./next-app + dockerfile: prod.Dockerfile + args: + ENV_VARIABLE: ${ENV_VARIABLE} + NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} + restart: always + ports: + - 3000:3000 + networks: + - my_network + + # Add more containers below (nginx, postgres, etc.) + +# Define a network, which allows containers to communicate +# with each other, by using their container name as a hostname +networks: + my_network: + external: true diff --git a/examples/with-docker-compose/next-app/.gitignore b/examples/with-docker-compose/next-app/.gitignore new file mode 100644 index 0000000000000..1437c53f70bc2 --- /dev/null +++ b/examples/with-docker-compose/next-app/.gitignore @@ -0,0 +1,34 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel diff --git a/examples/with-docker-compose/next-app/dev.Dockerfile b/examples/with-docker-compose/next-app/dev.Dockerfile new file mode 100644 index 0000000000000..d5d7f79880f39 --- /dev/null +++ b/examples/with-docker-compose/next-app/dev.Dockerfile @@ -0,0 +1,15 @@ +FROM node:18-alpine + +WORKDIR /app + +# Copy lock files if file exists +COPY package.json yarn.lock* package-lock.json* . + +RUN yarn install + +COPY src ./src +COPY public ./public +COPY next.config.js . +COPY tsconfig.json . + +CMD yarn dev diff --git a/examples/with-docker-compose/next-app/next-env.d.ts b/examples/with-docker-compose/next-app/next-env.d.ts new file mode 100644 index 0000000000000..4f11a03dc6cc3 --- /dev/null +++ b/examples/with-docker-compose/next-app/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/examples/with-docker-compose/next-app/next.config.js b/examples/with-docker-compose/next-app/next.config.js new file mode 100644 index 0000000000000..0568ecc9e5401 --- /dev/null +++ b/examples/with-docker-compose/next-app/next.config.js @@ -0,0 +1,5 @@ +module.exports = { + experimental: { + outputStandalone: true, + }, +} diff --git a/examples/with-docker-compose/next-app/package.json b/examples/with-docker-compose/next-app/package.json new file mode 100644 index 0000000000000..2a67a59e0f83f --- /dev/null +++ b/examples/with-docker-compose/next-app/package.json @@ -0,0 +1,19 @@ +{ + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "latest", + "react": "18.1.0", + "react-dom": "18.1.0" + }, + "devDependencies": { + "@types/node": "17.0.42", + "@types/react": "18.0.12", + "@types/react-dom": "18.0.5", + "typescript": "4.7.3" + } +} diff --git a/examples/with-docker-compose/next-app/prod-without-multistage.Dockerfile b/examples/with-docker-compose/next-app/prod-without-multistage.Dockerfile new file mode 100644 index 0000000000000..ad3718bc17a41 --- /dev/null +++ b/examples/with-docker-compose/next-app/prod-without-multistage.Dockerfile @@ -0,0 +1,28 @@ +FROM node:18-alpine + +WORKDIR /app + +# Copy lock files if file exists +COPY package.json yarn.lock* package-lock.json* . + +# Omit --production flag for TypeScript devDependencies +RUN yarn install + +COPY src ./src +COPY public ./public +COPY next.config.js . +COPY tsconfig.json . + +# Environment variables must be present at build time +# https://github.com/vercel/next.js/discussions/14030 +ARG ENV_VARIABLE +ENV ENV_VARIABLE=${ENV_VARIABLE} +ARG NEXT_PUBLIC_ENV_VARIABLE +ENV NEXT_PUBLIC_ENV_VARIABLE=${NEXT_PUBLIC_ENV_VARIABLE} + +# Uncomment the following line to disable telemetry at build time +# ENV NEXT_TELEMETRY_DISABLED 1 + +RUN yarn build + +CMD yarn start diff --git a/examples/with-docker-compose/next-app/prod.Dockerfile b/examples/with-docker-compose/next-app/prod.Dockerfile new file mode 100644 index 0000000000000..be7eb8e8f0771 --- /dev/null +++ b/examples/with-docker-compose/next-app/prod.Dockerfile @@ -0,0 +1,57 @@ +# Step 1. Rebuild the source code only when needed +FROM node:18-alpine AS builder + +WORKDIR /app + +# Copy lock files if file exists +COPY package.json yarn.lock* package-lock.json* . + +# Omit --production flag for TypeScript devDependencies +RUN yarn install + +COPY src ./src +COPY public ./public +COPY next.config.js . +COPY tsconfig.json . + +# Environment variables must be present at build time +# https://github.com/vercel/next.js/discussions/14030 +ARG ENV_VARIABLE +ENV ENV_VARIABLE=${ENV_VARIABLE} +ARG NEXT_PUBLIC_ENV_VARIABLE +ENV NEXT_PUBLIC_ENV_VARIABLE=${NEXT_PUBLIC_ENV_VARIABLE} + +# Uncomment the following line to disable telemetry at build time +# ENV NEXT_TELEMETRY_DISABLED 1 + +RUN yarn build + +# Step 2. Production image, copy all the files and run next +FROM node:18-alpine AS runner + +WORKDIR /app + +# Don't run production as root +RUN addgroup --system --gid 1001 nodejs +RUN adduser --system --uid 1001 nextjs +USER nextjs + +COPY --from=builder /app/public ./public +COPY --from=builder /app/next.config.js . +COPY --from=builder /app/package.json . + +# Automatically leverage output traces to reduce image size +# https://nextjs.org/docs/advanced-features/output-file-tracing +COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ +COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static + +# Environment variables must be redefined at run time +ARG ENV_VARIABLE +ENV ENV_VARIABLE=${ENV_VARIABLE} +ARG NEXT_PUBLIC_ENV_VARIABLE +ENV NEXT_PUBLIC_ENV_VARIABLE=${NEXT_PUBLIC_ENV_VARIABLE} + +# Uncomment the following line to disable telemetry at run time +# ENV NEXT_TELEMETRY_DISABLED 1 + +CMD node server.js diff --git a/examples/with-docker-compose/next-app/public/favicon.ico b/examples/with-docker-compose/next-app/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..4965832f2c9b0605eaa189b7c7fb11124d24e48a GIT binary patch literal 15086 zcmeHOOH5Q(7(R0cc?bh2AT>N@1PWL!LLfZKyG5c!MTHoP7_p!sBz0k$?pjS;^lmgJ zU6^i~bWuZYHL)9$wuvEKm~qo~(5=Lvx5&Hv;?X#m}i|`yaGY4gX+&b>tew;gcnRQA1kp zBbm04SRuuE{Hn+&1wk%&g;?wja_Is#1gKoFlI7f`Gt}X*-nsMO30b_J@)EFNhzd1QM zdH&qFb9PVqQOx@clvc#KAu}^GrN`q5oP(8>m4UOcp`k&xwzkTio*p?kI4BPtIwX%B zJN69cGsm=x90<;Wmh-bs>43F}ro$}Of@8)4KHndLiR$nW?*{Rl72JPUqRr3ta6e#A z%DTEbi9N}+xPtd1juj8;(CJt3r9NOgb>KTuK|z7!JB_KsFW3(pBN4oh&M&}Nb$Ee2 z$-arA6a)CdsPj`M#1DS>fqj#KF%0q?w50GN4YbmMZIoF{e1yTR=4ablqXHBB2!`wM z1M1ke9+<);|AI;f=2^F1;G6Wfpql?1d5D4rMr?#f(=hkoH)U`6Gb)#xDLjoKjp)1;Js@2Iy5yk zMXUqj+gyk1i0yLjWS|3sM2-1ECc;MAz<4t0P53%7se$$+5Ex`L5TQO_MMXXi04UDIU+3*7Ez&X|mj9cFYBXqM{M;mw_ zpw>azP*qjMyNSD4hh)XZt$gqf8f?eRSFX8VQ4Y+H3jAtvyTrXr`qHAD6`m;aYmH2zOhJC~_*AuT} zvUxC38|JYN94i(05R)dVKgUQF$}#cxV7xZ4FULqFCNX*Forhgp*yr6;DsIk=ub0Hv zpk2L{9Q&|uI^b<6@i(Y+iSxeO_n**4nRLc`P!3ld5jL=nZRw6;DEJ*1z6Pvg+eW|$lnnjO zjd|8>6l{i~UxI244CGn2kK@cJ|#ecwgSyt&HKA2)z zrOO{op^o*- + + \ No newline at end of file diff --git a/examples/with-docker-compose/next-app/src/pages/_app.tsx b/examples/with-docker-compose/next-app/src/pages/_app.tsx new file mode 100644 index 0000000000000..33da2fce548ca --- /dev/null +++ b/examples/with-docker-compose/next-app/src/pages/_app.tsx @@ -0,0 +1,6 @@ +import '../styles/globals.css' +import type { AppProps } from 'next/app' + +export default function MyApp({ Component, pageProps }: AppProps) { + return +} diff --git a/examples/with-docker-compose/next-app/src/pages/index.tsx b/examples/with-docker-compose/next-app/src/pages/index.tsx new file mode 100644 index 0000000000000..c1d66369a0651 --- /dev/null +++ b/examples/with-docker-compose/next-app/src/pages/index.tsx @@ -0,0 +1,68 @@ +import Head from 'next/head' +import Image from 'next/image' +import styles from '../styles/Home.module.css' + +export default function Home() { + return ( + + ) +} diff --git a/examples/with-docker-compose/next-app/src/styles/Home.module.css b/examples/with-docker-compose/next-app/src/styles/Home.module.css new file mode 100644 index 0000000000000..ca99ded55f602 --- /dev/null +++ b/examples/with-docker-compose/next-app/src/styles/Home.module.css @@ -0,0 +1,128 @@ +.container { + min-height: 100vh; + padding: 0 0.5rem; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.main { + padding: 5rem 0; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.footer { + width: 100%; + height: 100px; + border-top: 1px solid #eaeaea; + display: flex; + justify-content: center; + align-items: center; +} + +.footer img { + margin-left: 0.5rem; +} + +.footer a { + display: flex; + justify-content: center; + align-items: center; +} + +.title a { + color: #0070f3; + text-decoration: none; +} + +.title a:hover, +.title a:focus, +.title a:active { + text-decoration: underline; +} + +.title { + margin: 0; + line-height: 1.15; + font-size: 4rem; +} + +.subtitle { + margin: 0; + line-height: 1.15; + font-size: 2rem; +} + +.title, +.description { + text-align: center; +} + +.description { + line-height: 1.5; + font-size: 1.5rem; +} + +.code { + background: #fafafa; + border-radius: 5px; + padding: 0.75rem; + font-size: 1.1rem; + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; +} + +.grid { + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + max-width: 800px; + margin-top: 3rem; +} + +.card { + margin: 1rem; + flex-basis: 45%; + padding: 1.5rem; + text-align: left; + color: inherit; + text-decoration: none; + border: 1px solid #eaeaea; + border-radius: 10px; + transition: color 0.15s ease, border-color 0.15s ease; +} + +.card:hover, +.card:focus, +.card:active { + color: #0070f3; + border-color: #0070f3; +} + +.card h3 { + margin: 0 0 1rem 0; + font-size: 1.5rem; +} + +.card p { + margin: 0; + font-size: 1.25rem; + line-height: 1.5; +} + +.logo { + height: 1em; +} + +@media (max-width: 600px) { + .grid { + width: 100%; + flex-direction: column; + } +} diff --git a/examples/with-docker-compose/next-app/src/styles/globals.css b/examples/with-docker-compose/next-app/src/styles/globals.css new file mode 100644 index 0000000000000..e5e2dcc23baf1 --- /dev/null +++ b/examples/with-docker-compose/next-app/src/styles/globals.css @@ -0,0 +1,16 @@ +html, +body { + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; +} + +a { + color: inherit; + text-decoration: none; +} + +* { + box-sizing: border-box; +} diff --git a/examples/with-docker-compose/next-app/tsconfig.json b/examples/with-docker-compose/next-app/tsconfig.json new file mode 100644 index 0000000000000..b8d597880a1ae --- /dev/null +++ b/examples/with-docker-compose/next-app/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] +}