Hosting project on

Hosting platforms differ from each other and we have to take some actions before being compatible with


  • Open the <PROJECT_DIR>/.cikit/roles/cikit-project/meta/main.yml and addcikit-platformsh-cli role under the dependencies:

      - role: cikit-platformsh-cli
        tags: ["platformsh"]
  • Create and .platform directory within <PROJECT_DIR>, following the official documentation.

Configure hosting

  • Generate an API token or use an existing one.
  • Create the inside <PROJECT_DIR>.
      "id": "PROJECT_ID",

    Replace the PROJECT_ID and AUTHENTICATION_TOKEN by the actual data. Commit this file to private repositories only or just keep it locally.

Inject configuration

  • Open <PROJECT_DIR>/scripts/vars/main.yml and add the platformsh: "{{ lookup('file', '../') | from_json }}" variable.
  • Provision VM/CI server as usual.
  • Read how to grab a database from one of environments using SQL workflow.
  • Use similar contents of the .environment file in the root of your project since it’ll be added to the /etc/profile. The $PLATFORM_APP_DIR is available on but in a local VM we have to set it manually. This little trick does the job.

    # This is the file.
    # -
    # CIKit support for this file.
    # -
    # Statements in this file will be executed (sourced) by the shell in SSH
    # sessions, in deploy hooks, in cron jobs, and in the application's runtime
    # environment.
    export PATH="$PLATFORM_APP_DIR/bin:$PATH"