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 and Experience. 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.


Description of register-compilation-server.png follows
Description of the illustration register-compilation-server.png

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 and Experience 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 dialog. When you publish the site, it gets compiled through the compilation server.

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.


Description of cec-create-compilation-server-command.png follows
Description of the illustration cec-create-compilation-server-command.png

To create the Docker image and publish the Docker file:

  1. Download the Docker image information from GitHub.Description of download-docker-file-github-3.png follows
    Description of the illustration download-docker-file-github-3.png

    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 OCE 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.Description of multiple-ways-run-compilation-service.png follows
    Description of the illustration multiple-ways-run-compilation-service.png
  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 OCE 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.