Create Tomorrow Sport

The procedure described in this section is a short cut to setting up Tomorrow Sport as a sister publication to Tomorrow Online. For a general description of how to serve multiple publications based on a single publication definition, see Multi-publication Support.

To create and publish Tomorrow Sport:

  1. Create a new publication in the Content Store called tomorrow-sport, using the publication definition called tomorrow-sport-with-content.zip which you will find in the tomorrow-online/publication/dist folder. This file is identical to the tomorrow-online-with-content.zip file that you used to create Tomorrow Online, except for its content, which is exclusively sport-related. For instructions on how to create new publications in the Content Store, see /ece-install-guide/7.1/create_a_publication.html.

  2. Give your CUE Front user (that is, the user the Cook uses to log in to the Content Store) a minimum of read access to the new publication. If you just accepted defaults when installing CUE Front, then the Tomorrow Online admin user (tomorrow-online_admin) is your CUE Front user. If you also use this user for working in CUE, then you will probably want to give this user read/write access to Tomorrow Sport. If you use a different user for working in CUE, then you can just give read access to the CUE Front user, and read/write access to your editing user. For general information on how to create and manage users and user access rights, see the CUE Content Store Publication Administrator Guide.

  3. Copy waiter-config.yml from your publication-path/contrib/tomorrow-sport/ folder to publication-path/setup/defaults/. For example:

    mkdir -p publication-path/setup/defaults
    cp publication-path/contrib/tomorrow-sport/waiter-config.yml publication-path/setup/defaults/

    The contents of waiter-config.yml are based on the assumption that your publications are called tomorrow-online and tomorrow-sport. If this is not the case, then you will need to open the file and edit it.

  4. Open the blueprint.yml file in your config folder (cue-front-path/myconfig/blueprint.yml, for example) in an editor, and remove the following lines:

        publications-name: tomorrow-online
        publications-hostNames: localhost

    From the waiter: section of the file.

  5. Copy nginx.conf from the publication-path/contrib/tomorrow-sport/ folder to publication-path/service/waiter/docker/. For example:

    cp publication-path/contrib/tomorrow-sport/nginx.conf publication-path/service/waiter/docker/nginx.conf
  6. Open the copied file for editing and change this line:

          server_name  sister.publication.hostname;

    Replace sister.publication.hostname with whatever host name you want to use for the Tomorrow Sport site. For example:

          server_name  tomorrow-sport;
  7. Remake your config by running setup generate. For example:

    cd cue-front-path/setup
    docker-compose run setup generate myconfig
  8. Open your hosts file (/etc/hosts on MacOS and Linux, c:\Windows\System32\Drivers\etc\hosts on Windows), for editing and add your selected host name as an alias for the IP address 127.0.0.0. For example:

    127.0.0.1 localhost tomorrow-sport
  9. Rebuild and restart the Waiter:

    docker-compose build waiter
    docker-compose restart waiter

You should now be able to access Tomorrow Online on http://localhost:8100 as before, and Tomorrow Sport on http://tomorrow-sport:8100. Tomorrow Sport should have different content and a different appearance than Tomorrow Online.

If you now overwrite your myconfig setup by running setup add then you will break this configuration. To prevent the risk of this occurring, you can open the default blueprint.yml file (cue-front-path/setup/defaults/blueprint.yml) in an editor and remove these lines:

  publications-name:
    message: "Publication-name"
    default: "tomorrow-online"

  publications-hostNames:
    message: "Publication-hostname"
    default: "localhost"

from the waiter: section of the file. This will prevent setup add from prompting for a publication name and host name.