Giter Club home page Giter Club logo

sample-next-app's Introduction

sample next.js app pipeline status

https://sample-next-app.fabrique.social.gouv.Fr

A sample SSR Next.js app with :

Development

Start hasura and local postgres using

docker-compose up

Hasura migrations and metadata will be automatically applied.

to launch the Hasura console, you can run the command

hasura console --envfile ../.env --project hasura

And then launch the frontend (next.js app) using

yarn dev

Production

Env vars

⚠ You need to set client-side browser process.env variables at build time.

In docker this is done with --build-arg.

Var desc build time run time
PORT port to run the server on
SENTRY_DSN DSN of your sentry project
SENTRY_TOKEN token to allow sourcemaps
NEXT_PUBLIC_MATOMO_URL URL to your matomo instance
NEXT_PUBLIC_MATOMO_SITE_ID site id on matomo instance

Docker build

docker build \
  --build-arg SENTRY_DSN="https://[hash]@url.sentry.com/42" \
  --build-arg SENTRY_TOKEN="1234" \
  --build-arg MATOMO_URL="https://url.matomo.com" \
  --build-arg MATOMO_SITE_ID=42 \
  . -t sample-next-app

Docker run

docker run -it --init --rm -p 3000:3000 sample-next-app

Tips

sample-next-app's People

Contributors

renovate[bot] avatar douglasduteil avatar socialgroovybot avatar renovate-bot avatar dependabot[bot] avatar lionelb avatar gary-van-woerkens avatar nkrmr avatar kwiss avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.