Squidex
  • Welcome to Squidex
  • Getting Started
    • Squidex Cloud
    • Installation Instructions
      • Platforms
        • Install on Kubernetes
        • Install on AWS (Deprecated)
        • Install on AWS EC2 using Docker
        • Install on Azure
        • Install on Azure using ARM
        • Install on Google Cloud Platform (GCP)
        • Install on Docker
        • Install on Heroku
        • Install on IIS
        • Install on Render
        • Install on Vultr
      • Configuration
        • Deploying the Image Resizer Service
      • Troubleshooting and Support
        • Diagnose Runtime Issues
        • Restoring Deleted Apps
      • Install Identity (Deprecated)
      • External Identity Providers
        • Azure AD (OAuth) with Squidex
    • Contributing and Developing
      • Building
      • Developing
      • Extensions
        • Custom Rule Action
      • Contributing
      • Architecture
      • Translating
      • Squidex Docs Program
    • Roadmap
    • Quick Start Guides
      • Vue.js Blog with Squidex
      • React.js Blog with Squidex
      • Angular Blog with Squidex
  • Documentation
    • Introduction and Use Case
    • Concepts
      • Apps
      • Teams
      • Schemas
        • Field Rules
      • Content
        • Scheduled Publishing
      • Assets
        • Querying Assets
      • Localization
      • Migrations
      • Roles & Permissions
      • Rules
        • Publish an Event to Azure Queues using Rules
        • Populate Elasticsearch Index
      • Backups
      • Subscriptions
        • App Subscriptions v/s Team Subscriptions
      • Notifications
      • Dashboard
      • Workflows
    • Software Development Kits
      • TypeScript
      • .NET
        • Version v14 (and Earlier)
        • Version v15 (and Later)
      • PHP
      • Java
    • Developer Guides
      • API
        • Authentication
        • Postman
        • Queries
        • Assets
      • Automation Tools (CLI)
      • Scripting
        • Scripting Helper Methods
      • Embed Content
      • Custom Workflows
      • Custom Editors
      • Custom Sidebars
      • Preview Content
      • Rule Formatting
        • Simple
        • Script
        • Liquid
      • Tutorials
        • Building a Blog with Squidex and Next.js
  • Next
    • Squidex 3.0: API Compatibility
Powered by GitBook
On this page
  • 1. Build for docker
  • 2. Build Squidex for Manual Deployment
  • 2.1. Build Squidex with Docker
  • 2.2. Build Squidex Manually

Was this helpful?

  1. Getting Started
  2. Contributing and Developing

Building

How to Build Squidex Using Docker or Manually

PreviousContributing and DevelopingNextDeveloping

Last updated 2 years ago

Was this helpful?

1. Build for docker

You can view provided Docker images on Docker hub:

  • squidex/squidex:latest (the latest stable version).

  • squidex/squidex:vX.XX (a specific stable version).

  • squidex/squidex:dev (the latest dev version - master branch).

  • squidex/squidex:dev-XXXX (a specific dev version - master branch).

To build a custom image, use the multistage Dockerfile and simply run the following command:

docker build . -t my/squidex

2. Build Squidex for Manual Deployment

When you want to deploy to IIS or NGINX you may prefer to build manually. Note that we also provide prebuilt binaries on GitHub, link below:

You will find the built files under $SQUIDEX/publish.

$SQUIDEXis a placeholder for the path to your local copy of the Squidex source code.

2.1. Build Squidex with Docker

Run the following commands in PowerShell or bash to build Squidex with Docker:

# Build the image
docker build . -t squidex-build-image

# Create the container
docker create --name squidex-build-container squidex-build-image

# Copy the output to the host file system
docker cp squidex-build-container:/app/. ./publish

# Cleanup
docker rm squidex-build-container
docker rmi squidex-build-image

Alternatively, we also provide a script file (containing these commands) for both Windows and Linux.

For Windows, use the build.ps1 script.

For Linux, use the build.sh script.

We recommend giving the Docker machine at least 4GB of memory.

2.2. Build Squidex Manually

If you don't want to use Docker, you can also build manually.

2.2.1. Build the current Version

The current structure differentiates between the frontend and the backend.

The advantage is that the code is separated, so you can use multiple contains to build them independently, this makes better use of caching in Docker. After building frontend and backend, copy the build artifacts to a common folder. You can use $SQUIDEX/publish for this step.

To build the backend, run the following commands.

cd backend
cd src/Squidex
dotnet publish --configuration Release --output "../../../publish"

To build the frontend, run the following commands.

cd frontend
npm i # Install npm packages
npm run build
copy build "../publish/wwwroot/build"

2.2.2. Build the .NET Core 2.0 Version without Docker

Very old versions that still work with .NET Core 2.0 have a different structure. Therefore the build process is slightly different. For most people this version is not relevant anymore.

npm i
npm run build

dotnet restore
dotnet publish --configuration Release --output "../../publish"

Please note, on Windows you must run PowerShell or CMD.exe in elevated mode (Run as Administrator) to install the required build tools for node-sass.

npm install --global --production windows-build-tools

We recommend building Squidex with Docker, because it ensures a clean environment. Due to Docker , the build isn't much slower and in some cases, it can actually be quicker.

https://hub.docker.com/r/squidex/squidex/
https://github.com/Squidex/squidex/releases
layers
Project structure