Web Analytics

Run Syncloop on docker

Overview

Using docker, developers can run the Syncloop API platform on a docker container.

Prerequisites

To run Syncloop on docker, you must meet following requirements:

  • Docker CLI should be installed on the machine. Follow this link to setup docker.
  • Docker image will be pulled from docker centralized repository. Ensure you have outbound network allowance with the docker repository.

Run on Docker CLI

To run Syncloop use the following command

Verify the running container

docker container ls

If you see the following it means Syncloop is successfully running on docker now open the URL in browser and verify.

http://localhost:80

Run on Docker CLI

You can deploy and manage multi-container applications defined in the ompose file. Create a file called docker-compose.yaml and add following content:

version: '2.1'
services:
syncloop:
	image: nature9/syncloop
	environment:
	  - LOGGING_FILE=/logs/server.log
	ports:
	  - "80:80"
	volumes:
	  - log_volume:/logs
	 volumes:
  log_volume:

Environmental variables:

LOGGING_FILE: Full path of server.log file for logging.

Use the following command to run docker.

docker compose up

If you see the following it means Syncloop is successfully running on docker now open the URL in browser.

http://localhost:80

Run on AWS ECS

Developers can also deploy a docker container to aws ecs service from their local command tool. To do this read more in detail how docker offers integration with AWS ECS.

To run Syncloop on AWS ECS follow these easy steps:

ECS Architecture Diagram

  • Create an IAM user with following permissions
    • ec2:AuthorizeSecurityGroupIngress
    • application-autoscaling:*
    • elasticfilesystem:*
    • route53:GetHostedZone
    • logs:*
    • route53:GetHealthCheck
    • iam:CreateRole
    • iam:AttachRolePolicy
    • iam:PutRolePolicy
    • route53:ListHostedZonesByName
    • ecs:DeregisterTaskDefinition
    • servicediscovery:*
    • ecs:UpdateService
    • iam:GetRole
    • iam:PassRole
    • ecs:CreateService
    • iam:DetachRolePolicy
    • ec2:CreateSecurityGroup
    • ecs:ListTasks
    • iam:DeleteRolePolicy
    • ecs:RegisterTaskDefinition
    • ecs:DescribeServices
    • route53:DeleteHostedZone
    • logs:FilterLogEvents
    • ec2:DescribeRouteTables
    • ecs:DescribeTasks
    • route53:CreateHostedZone
    • logs:DescribeLogGroups
    • logs:DeleteLogGroup
    • ec2:CreateTags
    • ecs:CreateCluster
    • ecs:DeleteService
    • ecs:DeleteCluster
    • cloudformation:*
    • iam:DeleteRole
    • elasticloadbalancing:*
    • logs:CreateLogGroup
    • ec2:DescribeSecurityGroups
    • ecs:DescribeClusters
    • ec2:RevokeSecurityGroupIngress
    • ecs:ListAccountSettings
    • ec2:DescribeVpcs
    • ec2:DeleteSecurityGroup
    • ec2:DescribeSubnets
  • Create aws ecs context by using command
    docker context create ecs Syncloop-platform
  • Select the created context
    docker context use Syncloop-platform
  • Deploy docker compose on ecs cluster.
    docker compose up
  • When the above command is successful. Go to aws ec2 load balancer.
  • Select the newly created aws elb and option the DNS name in the browser.
  • Syncloop will support both http & https. Read the docker ecs document to use your SSL certificate.