Building
How to build Squidex using Docker or manually.

1. Build for docker

We provide docker images on docker hub: https://hub.docker.com/r/squidex/squidex/
  • squidex/squidex:latest is the latest stable version.
  • squidex/squidex:vX.XX is a specific stable version.
  • squidex/squidex:dev is the latest dev version (master branch).
  • squidex/squidex:dex-XXXX is a specific dev version (master branch).
To build a custom image use our multistage dockerfile. Just run:
1
docker build . -t my/squidex
Copied!

2. Build for manual deployment

In this paragraph $SQUIDEXis a placeholder for the path to your local copy of the Squidex source code.
When you want to deploy to IIS or Nginx you might want to build it manually. But keep in mind that we also provide the prebuild binaries on Github:
You can then find the files under $SQUIDEX/publish.

2.1. Build with docker

Run the following commands in Powershell or bash to build Squidex with docker:
1
# Build the image
2
docker build . -t squidex-build-image -f dockerfile.build
3
4
# Open the image
5
docker create --name squidex-build-container squidex-build-image
6
7
# Copy the output to the host file system
8
docker cp squidex-build-container:/out ./publish
9
10
# Cleanup
11
docker rm squidex-build-container
Copied!
Under windows just use the build.ps script.
We recommend to give your Docker machine at least 4GB of memory.

2.2. Build it manually

If you don't want to use docker, you can also build it manually. The project structure has changed slightly when we migrated Squidex from .NET Core 2.X to .NET Core 3.0.

2.2.1. Build the .NET 3.0 version

The new structure differentiates between the frontend and the backend:
Project structure
This has the advantage that the code is separated and that we can using multiple contains to build them independently and make better use of caching in docker. After both, frontend and backend, have been built, you need to copy the build artifacts to a common folder. We just assume that we use $SQUIDEX/publish for that.
To build the backend you have to run the following commands.
1
cd backend
2
cd src/Squidex
3
dotnet publish --configuration Release --output "../../../publish"
Copied!
To build the frontend you have to use the following commands.
1
cd frontend
2
npm i # Install npm packages
3
npm run build
4
copy build "../publish/wwwroot/build"
Copied!

2.2.2. Build the .NET 2.X without docker

1
npm i
2
npm run build
3
4
dotnet restore
5
dotnet publish --configuration Release --output "../../publish"
Copied!
Please note that on windows to install all required build tools for node-sass you have to run
1
npm install --global --production windows-build-tools
Copied!
from an elevated PowerShell or CMD.exe (run as Administrator).
We recommend to build Squidex with docker, because it ensures that you have a clean environment. Because of the docker layers the build is not much slower and can be even faster in some situations.
Last modified 2yr ago