Skip to content

Configuration and getting started

yohsii edited this page Sep 17, 2019 · 12 revisions

introduction

There are a few settings you will need to configure in the PuckWeb project appSettings.json file.

  1. connection string

you will need to point the connection string named PuckContext to an empty sql server database

  1. setting initial user email and password

you will need to modify the InitialUserEmail and InitialUserPassword AppSettings. this will be used to setup the initial admin user for Puck.

creating the database

you will need to run update-database -Context PuckContext in the package manager console targeting the puck.core project to create the database. there is a seed task that will run on app startup using the InitialUserEmail and InitialUserPassword settings you configured to create the initial user and add all CMS roles to the user.

additional configuration

  1. if you want to enable content notifications (ie edit, publish, delete, move) then you need to enter all the Smtp settings, here is an example:
  "SmtpHost": "smtp.sendgrid.net",
  "SmtpPort": 587,
  "SmtpUserName": "apikey",
  "SmtpPassword": "_password_",
  "SmtpUseSsl": false,
  "SmtpFrom": "puck@localhost"
  1. if you plan on storing your images in azure, set the AzureImageTransformer_AccountName and AzureImageTransformer_AccessKey AppSettings. to minimise customisation, you can leave AzureImageTransformer_ContainerName set as "azure".

Lucene index location

here are the three lucene related app settings:

"LuceneIndexPath": "~/App_Data/Lucene{machinename}",
"LuceneAzureIndexPath": "D:\\local\\Temp\\Lucene",
"UseAzureLucenePath": false,

the LuceneIndexPath app setting determines the location of the Lucene index. you can add the token "{machinename}" - for example: ~/App_Data/Lucene{machinename} to your path and this will be replaced with a server specific identifier. this is useful for environments with shared file system where multiple servers/workers are sharing the same disk - each worker will get a different lucene index and this will prevent file lock issues.

azure is one such environment and you can set the UseAzureLucenePath app setting to "true" when working in azure to use a temporary file location local to each worker instance. because azure temp file is local to each worker and not shared, you should not add the "{machinename}" token to LuceneAzureIndexPath.

Logging in to the backoffice

once you have the website setup in IIS, you can go to the admin section. the admin path is /puck/ and you will need to log in using the InitialUserEmail and InitialUserPassword you configured in the web.config.

Set your languages

the first thing you'll want to do is set your languages by visiting the settings section of the backoffice. you'll need to do this before creating any content.