/servicenow-docker-mid-server

A Docker Recipe for ServiceNow Mid Server

Primary LanguagePythonMIT LicenseMIT

servicenow-docker-mid-server

A Docker Recipe for ServiceNow Mid Server

Instruction to run mid server docker image

Vancouver:

  1. copy mid.env.example to mid.env
  2. add secrets to mid.env
  3. Run the docker image
docker run --env-file <env_file_name_here> <docker_tag or image_id>
  1. First time running the mid server
docker run -d --env-file run/mid.env \
  -v $(pwd)/run/snc_mid_server_container_files/snc_mid_server:/app \
  --name mid_server \
  arumugamsubramanian/mid-linux:vancouver-07-06-2023__patch2-hotfix1-10-04-2023_10-06-2023_1235

Note: Mount a local share folder to /app inside container to copy the content of mid server to host machine

  1. Validate the mid server and bring to green
  2. Login into docker container
docker exec -it mid_server bash
cp -r snc_mid_server/ /app/
exit
docker stop mid_server
  1. Now start the mid-server with below command from second time onwards
docker run -d --network="kind" --env-file run/mid.env \
  -v $(pwd)/run/snc_mid_server_container_files/snc_mid_server:/opt/snc_mid_server \
  --name mid_server \
  arumugamsubramanian/mid-linux:vancouver-07-06-2023__patch2-hotfix1-10-04-2023_10-06-2023_1235
  1. copy mid.env.example to mid.env
  2. add secrets to mid.env
  3. Run the docker image
docker run --env-file <env_file_name_here> <docker_tag or image_id>
  1. First time running the mid-server
docker run -d --env-file run/utah/mid.env \
  -v $(pwd)/run/utah/snc_mid_server:/app \
  --name mid_server_utah \
  arumugamsubramanian/mid-linux:utah-12-21-2022__patch7a-09-28-2023_10-10-2023_1258

Note: Mount a local share folder to /app inside container to copy the content of mid server to host machine

  1. Validate the mid-server and bring to green
  2. Login into docker container
docker exec -it mid_server_utah bash
cd ..
cp -r snc_mid_server/* /app/
cp snc_mid_server/.container /app/
exit
docker stop mid_server_utah
  1. Now start the mid-server with below command from second time onwards. I use KIND network because I run k8s cluster in kind network
docker run -d --network="kind" --env-file run/utah/mid.env \
  -v $(pwd)/run/utah/snc_mid_server:/opt/snc_mid_server \
  --name mid_server_utah \
  arumugamsubramanian/mid-linux:utah-12-21-2022__patch7a-09-28-2023_10-10-2023_1258