CMS Deployment

Deployment of apps/cms using Docker

The apps/cms is a part of a monorepo and can be deployed using Docker and Docker Compose. This can work with the staging or production branches, just swap out the name of the service cms-staging or cms-production in the commands below.

Prerequisites

  1. Docker: Ensure that Docker is installed on your machine or VM. If not, you can download and install it from Docker's official website.
  2. Docker Compose (Optional): This is beneficial if you have services that need to run together. Install it from here.
  3. Monorepo: Ensure the apps/cms directory exists and the corresponding apps/cms/Dockerfile and ./docker-compose.yml are there.

Step-by-step Guide

  1. Clone Repo

    Setup the the project by cloning the repo and switching to the staging or main branch:

    git clone git@github.com:TelesoftTechnologies/telesoft-nx.git telesoft-cms-staging
    cd telesoft-cms-staging
    git checkout staging
  2. Install Dependencies

    npm install
    1. Build apps/cms using Docker Compose
    docker-compose build cms-staging

. Run the apps/cms container using Docker Compose

docker-compose up

This will start the CMS app and any other services defined in the docker-compose.yml file. The docker-compose.yml file should have a service defined for the CMS app that uses the cms-app image built in the previous step.

  1. Configuring Default Port(optional)

    Once the apps/cms is running, you can access the CMS on port 5656 (default). The port and URL will depend on the configuration in the docker-compose.yml file, this can be edited accordingly.

  1. View apps/cms logs

    To view the logs for the running CMS app, use the following Docker Compose command:

    docker-compose logs cms-staging

    Replace cms-staging in the above example with the services defined in the docker-compose.yml file if it's different.