Running Optimizely 12 on a Mac
Now that Optimizely 12 runs on .NET 5 it can be run on a Mac, and with most front enders using Macs, I thought it might be useful to demonstrate the steps on how to get it up and running on a Mac.
- Install .NET 5.0
- Install Docker
- Install Powershell
- Install Brew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Run
brew install --cask powershell
- Install Brew (if not installed)
- Environment setup tasks (these only need running once)
- Run powershell (
pswh
in terminal or from finder, mission control, etc) - Run
dotnet new -i EPiServer.Net.Templates --nuget-source https://nuget.optimizely.com/feed/packages.svc/ --force
- Run
dotnet tool install EPiServer.Net.Cli --global --add-source https://nuget.optimizely.com/feed/packages.svc/
- Run
dotnet nuget add source http://nuget.episerver.com/feed/packages.svc -n Optimizely
- Run
dotnet dev-certs https --trust
- Run powershell (
- Setup a DB server on Docker
- Grab the docker compose file from my Gist (also included at the bottom of the post).
- In Terminal run
docker compose up
from where you saved the docker compose file.
- Create a new empty project. In Powershell run the following
dotnet new epicmsempty --name Training.A
cd Training.A
dotnet-episerver create-cms-database Training.A.csproj -S localhost -U sa -P 0pti_R0cks
dotnet-episerver add-admin-user Training.A.csproj -u admin -p P4ssw0rd! -e [email protected] -c EPiServerDB
dotnet build
dotnet run
⚠ NOTE: You will need to add/update permissions for WebAdmins as they aren't done by default.
You can now edit you code through Visual Studio for Mac, Visual Studio Code or Rider. I would also recommend installing Azure Data Studio if you have knowledge of SQL server and you're confident querying content in the database.
Andy Blyth
Andy Blyth, an Optimizely MVP (OMVP) and Technical Architect at 26 DX with a keen interest in martial arts, occasionally ventures into blogging when memory serves.