A simple Silverstripe site served by FrankenPHP.
This demo uses Docker so ensure you have it installed first.
Firstly, build the images.
docker compose build --no-cache
Next, install the dependencies and build the assets.
docker compose run --rm web yarn install
docker compose run --rm web yarn build
docker compose run --rm web composer install
Then build the database.
docker compose run --rm web sake dev/build
Now you can run the site, it should be accessible at https://localhost.
docker compose up
Once you are done be sure the stop the running containers by using the following command.
docker compose down --remove-orphans
If your 80 and 443 ports are currently in use you can specify alternative ports instead, see the example below.
SS_BASE_URL=https://localhost:4443 HTTP_PORT=8000 HTTPS_PORT=4443 HTTP3_PORT=4443 docker compose up
Then visit https://localhost:4443 to view the site.
The production mode example uses the worker mode.
Caution
This has not been tested in a production environment, so use at your discretion.
Here's how you can run the production mode locally.
docker compose -f compose.yml -f compose.prod.yml build
docker compose up -f compose.yml -f compose.prod.yml up