Set Up a Site Compilation Service

You can create a Docker image for the compilation server to set up a Site Compilation Service in Oracle Content Management. This service gives you the option to define a compilation server to use before you publish.

The compilation server has an endpoint in the form of a URL on the Administration>System>Sites and Assets page, in the Compilation Endpoint URL field. There you can enter the fully-qualified URL you want to be registered with the server, and then click Test to validate the endpoint. See Set a Compilation Endpoint URL.

The Site Compilation Service compiles pages of a site so that HTML pages are returned when the published site is accessed. When the Oracle Content Management server publishes a site, it will call the Site Compilation Service to compile the pages, if the service is configured.

Once you specify the endpoint for a site, you can enable automatic compilation on the Static Site Delivery tab of the Site Properties panel. When you publish the site, it gets compiled through the compilation server.

Note:

Oracle Content Management has a compilation service built-in to easily allow you to compile a site without any additional configuration, or you may manually set up a compilation service for testing purposes to validate site compilation, or to use custom libraries.

If a compilation server endpoint field is not defined, the site will automatically use the built-in site compilation service provided that you've enabled automatic compilation on the Static Site Delivery tab of the Site Properties panel.

The Site Compilation Service is an extension to the Toolkit commands. You can run cec compilation-server yourself, but the Docker image lets you create a compilation server using the standard mode and then adjust the configuration of the service.

To create the Docker image and publish the Docker file:

  1. Download the Docker image information from GitHub.

    When you download the information from GitHub, you have an additional three files, which are underneath the compilation server. One of the Docker images is the compilation server, which includes a Docker file and readme files.

  2. The run.sh command is executed after the Docker image is created.

    This command downloads the Oracle Content Management Toolkit, installs it, and creates your source directory.

  3. Then you can customize your environment and run the run.sh command. You can specify which port to use, timeouts, and anything else you want to change and then update and use the .sh command.
  4. After you download the Docker image information and change the compilation server directory, you can build the Docker file.

    You can remove the no-cache option if you have already downloaded the Content Toolkit so that you don't re-download everything.

  5. List your Docker image or images.
  6. Once the Docker image is available to you, register it.
  7. Verify that it works.

    Go to the exception file REST API, which lets you see which versions are supported. This test lets you validate that it runs.

  8. Now you need to register the server. It requires the first part of the server name and handles everything else inside of there.
  9. Go back to your system directory and your sites assets, where you can register your compilation endpoint and click Save.
  10. Go to your site's properties and specify what to publish and when to publish it.