- NVM to set up the node version used by the app.
- Yarn to manage node dependencies.
- Docker Compose to run backing services.
- Install node dependencies.
- Run
nvm use
to configure the node version used by the app. - Run
yarn install
to install all node dependencies.
- Run
- Set up the database and run schema migrations.
- Run
docker-compose up -d
to bring up the database. - Run
npx prisma migrate deploy
to run all schema migrations. - Run
npx prisma db seed
to seed the db.
- Run
- Run
nvm use
to configure the node version used by the app. - Run
docker-compose up -d
to bring up the backing services. - Run
yarn dev
to start the app at http://localhost:3000.
- Install Dokku, set up SSH keys and virtualhost settings. Read the docs.
- Create the app.
dokku apps:create donde
- Create backing services.
# Install the postgres plugin sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git # Create the database service dokku postgres:create donde-db # Link the database service to the app. This will set the DATABASE_URL env config in the app. dokku postgres:link donde-db donde
- Set up SSL through Let's Encrypt.
# Install the letsencrypt plugin sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git # Configure the plugin dokku config:set --global DOKKU_LETSENCRYPT_EMAIL=your-email@your.domain.com # Set the domain for the app dokku domains:set donde your.domain.com # Enable letsencrypt for the app dokku letsencrypt:enable donde # Set up SSL auto-renewal dokku letsencrypt:cron-job --add
- Configure Google Maps API key.
dokku config:set donde GOOGLE_MAPS_API_KEY=your_api_key
- Configure NextAuth. Read more.
dokku config:set donde NEXTAUTH_URL='https://your.domain.com' dokku config:set donde NEXTAUTH_SECRET="$(openssl rand -base64 32)"