{"id":19975203,"url":"https://github.com/gabepublic/docker-compose-elasticsearch","last_synced_at":"2026-04-09T12:49:00.633Z","repository":{"id":56089312,"uuid":"523426493","full_name":"gabepublic/docker-compose-elasticsearch","owner":"gabepublic","description":"Using docker compose to define a multi-container application that are running in a network created specifically for the application.","archived":false,"fork":false,"pushed_at":"2022-08-15T21:59:58.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T09:44:30.350Z","etag":null,"topics":["aws","aws-ecs","container","docker","docker-compose","elasticsearch","python-flask","setup","website"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabepublic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-10T16:57:03.000Z","updated_at":"2022-12-20T19:15:16.000Z","dependencies_parsed_at":"2022-08-15T13:00:22.569Z","dependency_job_id":null,"html_url":"https://github.com/gabepublic/docker-compose-elasticsearch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabepublic%2Fdocker-compose-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabepublic%2Fdocker-compose-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabepublic%2Fdocker-compose-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabepublic%2Fdocker-compose-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabepublic","download_url":"https://codeload.github.com/gabepublic/docker-compose-elasticsearch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241411480,"owners_count":19958746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-ecs","container","docker","docker-compose","elasticsearch","python-flask","setup","website"],"created_at":"2024-11-13T03:17:27.487Z","updated_at":"2025-12-30T22:56:09.491Z","avatar_url":"https://github.com/gabepublic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-compose-elasticsearch\n\nUsing docker compose to define a multi-container application that are running \nin a network created specifically for the application.\n\n## SUMMARY\n\n- The example demonstrates a multi-container docker application that is deployed\n  using docker-compose; the ElasticSearch container and the website container.\n  The website serves webpages and REST API. The REST API connects to the\n  ElasticSearch service in the first container.\n\n- The *website development setup* is demonstrated by: running the ElasticSearch \n  in the container, but the website is running outside the container in the\n  Python virtual environment. See the \"Test web application outside container\"\n  section below.  \n\n- The *local deployment of multi containers using the manual method* is\n  demonstrated in the \"Test application by starting each containers manually\" \n  section below.\n\n- The *local deployment using the docker compose method* is demonstrated in the\n  \"Test application by starting using docker compose\" section below.\n\n- Demonstrate the application *deployment to AWS ECS using the Fargate launch type*,\n  a serverless approach, in the \"Deploy\" \u003e \"AWS ECS using docker compose v3\" \n  section below. However, the deployment was not successful due to the limitation\n  of Fargate and the ElasticSearch requirements. May need to revisit in the future. \n  See alternative approach below using AWS ECS EC2.\n\n- Demonstrate the application *deployment to AWS ECS using the EC2 launch type*\n  in the \"Deploy\" \u003e \"AWS ECS **Launch-type=EC2** using docker compose v2\".\n  Several parameters were also reconfigured from the above Fargate deployment.\n  This deployment was succesful and demonstrated the multi-container application.\n\n- **Future refinements of this demo** include:\n  - Make the AWS ECS Fargate approach works for ElasticSearch as this is the \n    preferred AWS severless approach\n  - This may be possible by using the \"elasticsearch:7.6.2\" container, \n    to overcome the\n    `vm.max_map_count [65530] is too low, increase to at least [262144]` error,\n    preventing the container to start, and\n  - Using the docker-compose file version 3, and read the aws documentation\n    on how to specify the followings in the `ecs-params.yml` file:\n```\nservices:\n[...]\n    cpu_shares: 100\n    mem_limit: 3621440000\n    environment:\n      - discovery.type=single-node\n      - bootstrap.memory_lock=true\n      - \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"\n    logging:\n      driver: awslogs\n      options:\n        awslogs-group: foodtrucks\n        awslogs-region: us-west-2\n        awslogs-stream-prefix: es\n[...]\n```    \n\n## Prerequisite\n\n- Docker Engine - see [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)\n\n- Docker Compose\n```\n$ sudo apt-get update\n$ sudo apt-get install docker-compose\n```\n\n- ElasticSearch - we are using `docker.elastic.co/elasticsearch/elasticsearch:6.3.2`\n  hosted by [Elastic.co](https://www.docker.elastic.co/r/elasticsearch), **not**\n  the one from Docker Hub. Note: the latest version is `8.3.3` but the container\n  encountered error during startup as shown in the \"Issues to be investigated\"\n  section below.\n\n- For deployment, **AWS account**;  see \"Setup \u003e AWS account\"\n\n- For deployment, **AWS CLI installed \u0026 configured**; \n  see \"Setup \u003e AWS CLI installed \u0026 Configured\"\n  \n- For deployment, AWS ECS CLI installed; \n  see \"Setup \u003e AWS ECS CLI installed \u0026 configured\"\n\n## Setup\n\n- Clone this repo\n\n- The following tasks can be performed manually or by running the scripts\n  included with this repo.\n\n- To run the scripts, you need to make them executable first\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch\n$ chmod +x *.sh\n```\n\n- [Optional] To do it manually, copy the command inside the script file\n\n\nPerform the following AWS setup prior to the \"Deploy\" section.\n\n### AWS account\n\nGo to [Amazon AWS](https://aws.amazon.com/) to create an account.\n\n### AWS CLI installed \u0026 Configured\n\n- Install AWS CLI - see [Getting started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)\n\n- Configure AWS CLI\n\n- We assume that the AWS CLI has been configured as follow.\n\n- The `default` profile has been created and stored in the `~/.aws/config` file\n  as follow:\n```\n[default]\nregion=us-west-2\n```\n\n- The `default` credentials has been created and stored in the \n  `~/.aws/credential` file as follow:\n```\n[default]\naws_access_key_id = \u003creplace_with_actual_id\u003e\naws_secret_access_key = \u003creplace_with_actual_secret\u003e\n```\n\n### AWS ECS CLI installed \u0026 configured\n\n- [Installing the Amazon ECS CLI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html)\n\n- [Configuring the Amazon ECS CLI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_Configuration.html)\n  We assume that the Amazon ECS CLI profile has been created with profile name\n  of `ecs-tutorial`, and stored in the `~/.ecs/credentials` file, as follow:\n```\nversion: v1\n[...]\necs_profiles:\n  ecs-tutorial:\n    aws_access_key_id: \u003creplace_with_actual_id\u003e\n    aws_secret_access_key: \u003creplace_with_actual_secret\u003e\n```\n\n- We will configure the ECS CLI specifically for deploying this demo in this\n  repo\n\n\n## Develop\n\n- Build the docker image for the \"SFFoodtrucks\" flask application\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch\n$ chmod +x build-image.sh\n$ ./build-image.sh\n\n$ docker images\nREPOSITORY                         TAG                 IMAGE ID       CREATED          SIZE\ngabepublic/sffoodtruck-site-flask  0.1.0-linux-amd64   07b791d8c0e8   24 minutes ago   501MB\nubuntu                             18.04               8d5df41c547b   8 days ago       63.1MB\n```\n\n- At this point, we can test the multi-container application, \"sffoodtruck\",\n  manually as discussed below in \n  \"Tests - Test application by starting each containers manually\"\n\n- Publish the docker image to Docker Hub. This step is mandatory before \n  deploying to AWS.  \n```\n$ $ docker login\n#provide Docker Hub id and password\nWARNING! Your password will be stored unencrypted in /root/.docker/config.json.\nConfigure a credential helper to remove this warning. See\nhttps://docs.docker.com/engine/reference/commandline/login/#credentials-store\n\n$ docker push gabepublic/sffoodtruck-site-flask:0.1.0-linux-amd64\n[...]\n0.1.0-linux-amd64: digest: sha256:e1301bcc996e0e975fa083eb79ab0d970018ea809b1bc76f0a10b10d2c98ae64 size: 1984\n\n$ docker logout\n```\n\n- Check the `docker-compose.yml` file\n\n- Next, test running the multi-container application, \"sffoodtruck\", using\n  docker compose, as discussed below in \n  \"Tests - Test application by starting using docker compose\"\n  \n- Deploy the application to AWS; see \"Deploy\" section below.\n\n\n## Tests\n\nThis application has two containers: the ElasticSearch service container, and\nSFFoodTruck website container. The website serves the application webpage\nand APIs that connects to the ElasticSearch service container. Therefore, \nthe ElasticSearch container needs to be started first.\n\nFor this demo, the ElasticSearch docker image will be pulled from the official\nrepository hosted by `elastic.co`, and used without modification. The website\ndocker image is built using this repo, as defined in `Dockerfile`.\n \n### Test web application outside container\n\nThe website can be revised and tested prior to rebuilding the docker image to\nreduce development time, as follow:\n\n- Start the ElasticSearch container\n```\n$ ./02-start-elasticcontainer-bridge-network.sh\n\n# [Alternative]\n$ docker run -d --name es -p 9200:9200 -p 9300:9300 \\\n                  -e \"discovery.type=single-node\" \\\n                  docker.elastic.co/elasticsearch/elasticsearch:6.3.2\n```\n\n- Check the container is running\n```\n$ docker logs es\n```\n\n- [Recommended] Create the Python virtual environment, activate the virtual\n  environment, and install the required dependencies\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch\n$ virtualenv ./venv\n$ source ./venv/bin/activate\n(.venv) $ cd flaskapp\n(.venv) $ pip install -r requirements.txt\n```\n  \n- Modify the `\u003cproject_folder\u003e/docker-compose-elasticsearch/flaskapp/app.py` \n  as shown below:\n```\n#es = Elasticsearch(host='es')\n# Use the following when running outside thee container and connecting to\n# ElasticSearch container\nes = Elasticsearch()\n```  \n  \n- Start the website\n```\n(.venv) $ cd \u003cproject_folder\u003e/docker-compose-elasticsearch/flaskapp\n(.venv) $ python ./app.py --commandline True\n[...]\n * Running on all addresses (0.0.0.0)\n * Running on http://127.0.0.1:5000\n * Running on http://172.29.53.5:5000\nPress CTRL+C to quit\n```\n\n- Open browser and go to:\n  - `http://localhost:5000/`\n  - `http://localhost:5000/debug`  \n  - `http://localhost:5000/search?q=burger`  \n\n- When all done, close the browser, and (CTRL+C) stops the website\n\n- [Optional] Stop and delete the container\n```\n$ docker stop es\n$ docker rm es\n```\n\n- [Optional] Delete the ElasticSearch docker image\n```\n$ docker image rm docker.elastic.co/elasticsearch/elasticsearch:6.3.2\n```\n\n### Test application by starting each containers manually\n\nAfter building the website docker image, test the application by starting each\ncontainers (i.e., ElasticSearch and website containers) individually, starting\nwith the ElasticSearch container.\n\nHowever, before starting any containers we need to define a new network for\nthe containers to find and connect to each others, as explained in details\nbelow.\n\n- By default, docker containers run on the bridge network. Check the network:\n```\n# list the networks\n$ docker network ls\nNETWORK ID     NAME             DRIVER    SCOPE\n7fb9c58ec5c5   bridge           bridge    local\ne0ef2370704e   docker_default   bridge    local\n3fd3dfe5c6a3   host             host      local\n0b63a4acccd2   none             null      local\n\n# show which containers are on the bridge network\n$ docker network inspect bridge\n```\n\n- However, containers are not able to find nor connect to each other via the\n  `0.0.0.0` or `localhost` because that is the port to access the container from\n  the host only, not between containers. Therefore, we need to define a network,\n  `foodtrucks-net`, where assigned containers can connect.\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch/\n$ ./03-create-custom-network.sh\n\n# [Alternative]\n$ docker network create foodtrucks-net\n5c74154971d342e288401ed9880f3912304fcd98e3df8a9da4068db073b7cd4b\n\n$ docker network ls\nNETWORK ID     NAME             DRIVER    SCOPE\n7fb9c58ec5c5   bridge           bridge    local\ne0ef2370704e   docker_default   bridge    local\n5c74154971d3   foodtrucks-net   bridge    local\n3fd3dfe5c6a3   host             host      local\n0b63a4acccd2   none             null      local\n```\n\n- Start the ElasticSearch container connecting the newly created network:\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch/\n$ ./04-start-elasticcontainer-custom-network.sh\n\n# [Alternative]\n$ docker run -d --name es --net foodtrucks-net \n                  -p 9200:9200 -p 9300:9300 \\\n                  -e \"discovery.type=single-node\" \\\n                  docker.elastic.co/elasticsearch/elasticsearch:6.3.2\n\n$ docker ps\nCONTAINER ID   IMAGE                                                 COMMAND                  CREATED         STATUS         PORTS\n                                                                         NAMES\nb1f352d90297   docker.elastic.co/elasticsearch/elasticsearch:6.3.2   \"/usr/local/bin/dock…\"   5 seconds ago   Up 3 seconds   0.0.0.0:9200-\u003e9200/tcp, :::9200-\u003e9200/tcp, 0.0.0.0:9300-\u003e9300/tcp, :::9300-\u003e9300/tcp   es\n```\n\n- Check the ElasticSearch container is running\n```\n$ docker logs es\n[...]\n[2022-08-11T03:17:32,339][INFO ][o.e.c.m.MetaDataIndexTemplateService] [9Hp2zTE] adding template [.monitoring-kibana] for index patterns [.monitoring-kibana-6-*]\n[2022-08-11T03:17:32,505][INFO ][o.e.l.LicenseService     ] [9Hp2zTE] license [bbd4078b-be07-4fef-ad01-d5eca5cf4b6d] mode [basic] - valid\n```\n\n- Check the container is running on the `foodtrucks-net` network\n```\n$ docker network inspect foodtrucks-net\n[\n    {\n        \"Name\": \"foodtrucks-net\",\n        \"Id\": \"5c74154971d342e288401ed9880f3912304fcd98e3df8a9da4068db073b7cd4b\",\n        \"Created\": \"2022-08-10T20:13:21.4511024-07:00\",\n        \"Scope\": \"local\",\n        \"Driver\": \"bridge\",\n        \"EnableIPv6\": false,\n        \"IPAM\": {\n            \"Driver\": \"default\",\n            \"Options\": {},\n            \"Config\": [\n                {\n                    \"Subnet\": \"172.19.0.0/16\",\n                    \"Gateway\": \"172.19.0.1\"\n                }\n            ]\n        },\n        \"Internal\": false,\n        \"Attachable\": false,\n        \"Ingress\": false,\n        \"ConfigFrom\": {\n            \"Network\": \"\"\n        },\n        \"ConfigOnly\": false,\n        \"Containers\": {\n            \"b1f352d902973c1ae03ff8caae87de23cc3376d6621f27fcf07217838871f6de\": {\n                \"Name\": \"es\",\n                \"EndpointID\": \"697be69f541c349fae252370771a33db7b7dc75e9119f4d4ac187691d71e03cc\",\n                \"MacAddress\": \"02:42:ac:13:00:02\",\n                \"IPv4Address\": \"172.19.0.2/16\",\n                \"IPv6Address\": \"\"\n            }\n        },\n        \"Options\": {},\n        \"Labels\": {}\n    }\n]\n```\n\n- Start the website container also connecting the newly created network:\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch\n$ ./05-start-flaskcontainer.sh\n\n# [Alternative]\n$ docker run -d --name foodtrucks-web --net foodtrucks-net -p 5000:5000 gabepublic/sffoodtruck-site-flask:0.1.0-linux-amd64\n```\n\n- Check the website container is running\n```\n$ docker logs foodtrucks-web\n[...]\n * Running on http://172.19.0.3:5000/ (Press CTRL+C to quit)\n```\n\n- Open browser and go to:\n  - `http://localhost:5000/`\n  - `http://localhost:5000/debug`  \n  - `http://localhost:5000/search?q=burger`  \n\n- When all done, close the browser, and stop the containers and delete the\n  network\n```\n$ ./06-stop-containers.sh\n```\n\n### Test application by starting using docker compose\n  \n- Start the multi-container application using docker compose\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch\n$ docker-compose up -d\n```\n\n- Check the custom network has been created, and inspect the network that both \n  containers are connect to it.\n```\n$ docker network ls\nNETWORK ID     NAME                                   DRIVER    SCOPE\n7fb9c58ec5c5   bridge                                 bridge    local\nb3cf8573b6e8   docker-compose-elasticsearch_default   bridge    local\ne0ef2370704e   docker_default                         bridge    local\n3fd3dfe5c6a3   host                                   host      local\n0b63a4acccd2   none                                   null      local\n\n$ docker inspect docker-compose-elasticsearch_default\n[\n    {\n        \"Name\": \"docker-compose-elasticsearch_default\",\n        \"Id\": \"b3cf8573b6e8e92726db439df49e77b3d2715576f4f2df4b40facd4b45fd4444\",\n        \"Created\": \"2022-08-11T15:38:39.0960527-07:00\",\n        \"Scope\": \"local\",\n        \"Driver\": \"bridge\",\n        \"EnableIPv6\": false,\n        \"IPAM\": {\n            \"Driver\": \"default\",\n            \"Options\": null,\n            \"Config\": [\n                {\n                    \"Subnet\": \"172.24.0.0/16\",\n                    \"Gateway\": \"172.24.0.1\"\n                }\n            ]\n        },\n        \"Internal\": false,\n        \"Attachable\": true,\n        \"Ingress\": false,\n        \"ConfigFrom\": {\n            \"Network\": \"\"\n        },\n        \"ConfigOnly\": false,\n        \"Containers\": {\n            \"758451732cc697c6c831116a97db0eab64808b3a15398c101545cfbc61ab6445\": {\n                \"Name\": \"docker-compose-elasticsearch_web_1\",\n                \"EndpointID\": \"51dfbe46c5566066f6282c15e93376c81e32b9bdbd43138b9354b6bebe8c2a1d\",\n                \"MacAddress\": \"02:42:ac:18:00:03\",\n                \"IPv4Address\": \"172.24.0.3/16\",\n                \"IPv6Address\": \"\"\n            },\n            \"b6d5c40c4188ad1c53681e3401c75b4dbe30829deba9587f93fccbf11d396f70\": {\n                \"Name\": \"es\",\n                \"EndpointID\": \"c52b69089ae25700af27201d7a0cbfecbf727ce3bdbee5c9ab020ecc929eb22b\",\n                \"MacAddress\": \"02:42:ac:18:00:02\",\n                \"IPv4Address\": \"172.24.0.2/16\",\n                \"IPv6Address\": \"\"\n            }\n        },\n        \"Options\": {},\n        \"Labels\": {\n            \"com.docker.compose.network\": \"default\",\n            \"com.docker.compose.project\": \"docker-compose-elasticsearch\",\n            \"com.docker.compose.version\": \"1.25.0\"\n        }\n    }\n]\n```\n\n- Check two containers are running\n```\n$ docker ps\nCONTAINER ID   IMAGE                                                 COMMAND                  CREATED         STATUS         PORTS\n                                        NAMES\n758451732cc6   gabepublic/sffoodtruck-site-flask:0.1.0-linux-amd64   \"python3 app.py\"         3 minutes ago   Up 2 minutes   0.0.0.0:5000-\u003e5000/tcp, :::5000-\u003e5000/tcp             docker-compose-elasticsearch_web_1\nb6d5c40c4188   docker.elastic.co/elasticsearch/elasticsearch:6.3.2   \"/usr/local/bin/dock…\"   3 minutes ago   Up 3 minutes   0.0.0.0:9200-\u003e9200/tcp, :::9200-\u003e9200/tcp, 9300/tcp   es\n```\n\n- Check ElasticSearch log\n```\n$ docker logs es\n[...]\n[2022-08-11T22:38:56,014][WARN ][o.e.x.s.a.s.m.NativeRoleMappingStore] [vXa0esb] Failed to clear cache for realms [[]]\n[2022-08-11T22:38:56,054][INFO ][o.e.l.LicenseService     ] [vXa0esb] license [e574e19d-62dc-460c-a421-cb28210106f1] mode [basic] - valid\n[2022-08-11T22:38:56,074][INFO ][o.e.g.GatewayService     ] [vXa0esb] recovered [1] indices into cluster_state\n[2022-08-11T22:38:57,112][INFO ][o.e.c.r.a.AllocationService] [vXa0esb] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[sfdata][2]] ...]).\n```\n\n- Check website logs\n```\n$ docker logs docker-compose-elasticsearch_web_1\n * Serving Flask app 'app' (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: on\n * Running on all addresses.\n   WARNING: This is a development server. Do not use it in a production deployment.\n * Running on http://172.24.0.3:5000/ (Press CTRL+C to quit)\n * Restarting with stat\n * Debugger is active!\n * Debugger PIN: 923-816-411\n```\n\n- Open browser and go to:\n  - `http://localhost:5000/`\n  - `http://localhost:5000/debug`  \n  - `http://localhost:5000/search?q=burger`  \n\n- When all done, close the browser, and stop \u0026 delete the application using\n  `docker-compose`:\n```\n$ docker-compose down -v\nStopping docker-compose-elasticsearch_web_1 ... done\nStopping es                                 ... done\nRemoving docker-compose-elasticsearch_web_1 ... done\nRemoving es                                 ... done\nRemoving network docker-compose-elasticsearch_default\nRemoving volume docker-compose-elasticsearch_esdata1\n```\n\n\n## Deploy\n\n### AWS ECS using docker compose v3\n\n**WARNING:** the following deployment to AWS ECS had some issues; the deployment\nwas successful BUT the ElasticSearch container failed to start due to the\nfollowing error; and hence the website container also exited by design and \nthe container stopped.\n```\nERROR: [3] bootstrap checks failed\n[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]\n[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]\n[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured\n```\n\nThis error is a known issue with the ECS with Fargate (serverless) deployment,\nand but it seems to be a very low priority (or not to fix) by aws.\nThe issue was reported:\n- https://stackoverflow.com/questions/62860516/how-to-increase-the-vm-max-map-count-in-aws-ecs-fargate\n- https://medium.com/@devfire/deploying-the-elk-stack-on-amazon-ecs-part-2-34c841e3b774\n\nThis error did not happen on the local deployment as shown above:\n- \"Test application by starting each container manually\"\n- \"Test application by starting using docker compose\"\n\nFurther due dilligence is needed to resolve the issue.\n\n**NOTE:** the error did not occur when using the \"ECS -\u003e EC2\", self-managed\ndeployment, and using the docker compose v2, and ElasticSearch version 7.6.2,\nas demonstrated by \n[Docker Curriculum - MULTI-CONTAINER ENVIRONMENTS](https://docker-curriculum.com/#multi-container-environments)\nand reproduced below in \"AWS ECS **Launch-type=EC2** using docker compose v2\".\n\n**Step-by-step:**\n\n- Check `ecs-cli`\n```\n$ ecs-cli --version\necs-cli version 1.21.0 (bb0b8f0)\n```\n\n- Make sure the AWS prerequisites (see \"Prerequisites\" section above) have been\n  fulfilled, and \"ecs_profiles \u003e ecs-tutorial\" exists.\n\n- Make sure the website docker image has been published to Docker Hub,\n  See \"Develop\" section above for instructions.\n\n- For more detailed information about the following steps, please refer to\n  [aws-ecs-docker-php-01](https://github.com/gabepublic/aws-ecs-docker-php-01)\n\n- Change the directory\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch/deploy-aws\n```\n\n- Create the task execution IAM role and attach policy:\n```\n$ ./01_create_task_execution_role_policy.sh\nCreating ecsTaskExecutionRole in us-west-2\n{\n    \"Role\": {\n        \"Path\": \"/\",\n        \"RoleName\": \"ecsTaskExecutionRole\",\n        \"RoleId\": \"AROAVCVML3GI3PA5P7ULU\",\n        \"Arn\": \"arn:aws:iam::349327579537:role/ecsTaskExecutionRole\",\n        \"CreateDate\": \"2022-08-12T02:46:49+00:00\",\n        \"AssumeRolePolicyDocument\": {\n            \"Version\": \"2012-10-17\",\n            \"Statement\": [\n                {\n                    \"Sid\": \"\",\n                    \"Effect\": \"Allow\",\n                    \"Principal\": {\n                        \"Service\": \"ecs-tasks.amazonaws.com\"\n                    },\n                    \"Action\": \"sts:AssumeRole\"\n                }\n            ]\n        }\n    }\n}\nAdd to ecsTaskExecutionRole, policy AmazonECSTaskExecutionRolePolicy, in us-west-2\n```\n\n- Create ecs-cli cluster config\n```\n$ ./03_create_aws_ecs_cluster_config.sh\nCreate cluster ecs-cluster-sffoodtrucks, config ecs-tutorial, launch type FARGATE in us-west-2\nINFO[0000] Saved ECS CLI cluster configuration ecs-tutorial.\nCreate AWS cloud cluster based on cli config ecs-tutorial and profile ecs-tutorial ...\nINFO[0000] Created cluster                               cluster=ecs-cluster-sffoodtrucks region=us-west-2\nINFO[0001] Waiting for your cluster resources to be created...\nINFO[0001] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS\nVPC created: vpc-092fccfdeb5001f83\nSubnet created: subnet-0c23aab29537bd147\nSubnet created: subnet-0e841e329417e2f98\nCluster creation succeeded.\nCapture the VPC_ID and continue on the next step...\n```\n\n- Capture the `VPC_ID` from the above step, and add the Security Group Rule.\n  The script will ask the `VPC_ID`.\n```\n$ ./05_retrieve_vpc_secinfo.sh\nEnter the VPC_ID (vpc-***)?\nvpc-092fccfdeb5001f83\nretrieve the Security GroupId for vpc-092fccfdeb5001f83\n{\n    \"SecurityGroups\": [\n        {\n            \"Description\": \"default VPC security group\",\n            \"GroupName\": \"default\",\n            \"IpPermissions\": [\n                {\n                    \"IpProtocol\": \"-1\",\n                    \"IpRanges\": [],\n                    \"Ipv6Ranges\": [],\n                    \"PrefixListIds\": [],\n                    \"UserIdGroupPairs\": [\n                        {\n                            \"GroupId\": \"sg-04e2e3b909c8d787c\",\n                            \"UserId\": \"349327579537\"\n                        }\n                    ]\n                }\n            ],\n            \"OwnerId\": \"349327579537\",\n            \"GroupId\": \"sg-04e2e3b909c8d787c\",\n            \"IpPermissionsEgress\": [\n                {\n                    \"IpProtocol\": \"-1\",\n                    \"IpRanges\": [\n                        {\n                            \"CidrIp\": \"0.0.0.0/0\"\n                        }\n                    ],\n                    \"Ipv6Ranges\": [],\n                    \"PrefixListIds\": [],\n                    \"UserIdGroupPairs\": []\n                }\n            ],\n            \"VpcId\": \"vpc-092fccfdeb5001f83\"\n        }\n    ]\n}\nCapture the VPC Security GroupId and continue on the next step...\n```\n\n- Capture the VPC Security GroupId, and add security group rule to allow \n  inbound access on port 5000. The script will ask the `Security GroupId`.\n  NOTE: port 5000 is used because for networkMode=awsvpc, the host ports and \n  container ports in port mappings must match.\n```\n$ ./06_create_aws_ecs_cluster_create_secrule.sh\nEnter the Security Group - GroupId (sg-***)?\nsg-04e2e3b909c8d787c\nadd a security group rule to allow inbound access on port 5000\n{\n    \"Return\": true,\n    \"SecurityGroupRules\": [\n        {\n            \"SecurityGroupRuleId\": \"sgr-0de0d1aec9033757a\",\n            \"GroupId\": \"sg-04e2e3b909c8d787c\",\n            \"GroupOwnerId\": \"349327579537\",\n            \"IsEgress\": false,\n            \"IpProtocol\": \"tcp\",\n            \"FromPort\": 5000,\n            \"ToPort\": 5000,\n            \"CidrIpv4\": \"0.0.0.0/0\"\n        }\n    ]\n}\n```\n\n- Deploy AWS ECS cluster; two files are needed: `docker-compose.yml` and\n  `ecs-params.yml`. **Revise** the `ecs-params.yml` to use the actual\n  VPC, subnet, and security group IDs from the previous step.\n```\n$ ./07_create_aws_ecs_cluster_deploy_list.sh\ndeploying cluster sffoodtrucks...\nINFO[0000] Using ECS task definition                     TaskDefinition=\"sffoodtrucks:3\"\nINFO[0000] Created Log Group foodtrucks in us-west-2\nWARN[0000] Failed to create log group foodtrucks in us-west-2: The specified log group already exists\nINFO[0000] Auto-enabling ECS Managed Tags\nINFO[0011] (service sffoodtrucks) has started 1 tasks: (task ef283d57e72940fb817b37beecacd011).  timestamp=\"2022-08-12 05:42:35 +0000 UTC\"\nINFO[0052] Service status                                desiredCount=1 runningCount=1 serviceName=sffoodtrucks\nINFO[0052] ECS Service has reached a stable state        desiredCount=1 runningCount=1 serviceName=sffoodtrucks\nINFO[0052] Created an ECS service                        service=sffoodtrucks taskDefinition=\"sffoodtrucks:3\"\n```\n\n- View the Running Containers on a Cluster\n```\n$ ./08_view_running_containers.sh\nName                                                           State    Ports                        TaskDefinition  Health\necs-cluster-sffoodtrucks/ef283d57e72940fb817b37beecacd011/web  RUNNING  54.201.54.11:5000-\u003e5000/tcp  sffoodtrucks:3  UNKNOWN\necs-cluster-sffoodtrucks/ef283d57e72940fb817b37beecacd011/es   RUNNING  54.201.54.11:9200-\u003e9200/tcp  sffoodtrucks:3  UNKNOWN\n```\n\n- View the Container Logs using the `TASK_ID` value for the container, shown \n  above. Revise the script with the actual `TASK_ID`.\n```\n$ ./09_view_container_logs.sh\n```\n\n- Scale the Tasks (number of containers) on the Cluster\n```\n$ ./10_scale_up_numberof_containers.sh\n```\n  - Verify the number of clusters\n```\n$ ./08_view_running_containers.sh\n```\n\n- View the application from the URL:\n  - `http://34.208.74.12:80/`\n\n\n#### CLEANUP\n\n- Delete the service so that it stops the existing containers and does not try \n  to run any more tasks. Then take down your cluster, which cleans up the \n  resources that you created earlier with ecs-cli up. Both tasks have been\n  included in the `11_cleanup_aws_ecs_cluster.sh` script:\n```\n$ ./11_cleanup_aws_ecs_cluster.sh\n```\n\n- Delete task definitions, `ecs-tutorial`, from the AWS console; go to\n  \"Amazon Elastic Container Service \u003e Task Definitions\" page.\n  - Click the task definitions `ecs-tutorial`\n  - On the `ecs-tutorial` task definitions page, select the `ecs-tutorial`\n    Task definition: revision, then \"Deregister\"\n\n- Delete the CloudWatch log group, `foodtrucks`, from the AWS Console, go to\n  \"CloudWatch \u003e Log groups\"\n\n- Delete the role name `ecsTaskExecutionRole` (if no longer needed);\n  use the \"AWS console \u003e IAM \u003e Access Management \u003e Roles\"\n  \n- Delete the AWS ECS profile `ecs-sffoodtrucks` (if no longer needed) from the local\n  `~/.ecs/config` file:\n```\nversion: v1\n[...]\nclusters:\n  ecs-sffoodtrucks:\n    cluster: ecs-sffoodtrucks\n    region: us-west-2\n    default_launch_type: FARGATE\n[...]\n```\n\n### AWS ECS **Launch-type=EC2** using docker compose v2\n\nSummary:\n- AWS ECS Launch-type=EC2 using t2.medium\n- docker compose v2 and configure the mem_limit (in bytes) and cpu_shares values\n- docker.elastic.co/elasticsearch/elasticsearch:7.6.2\n\n**Step-by-step deployment:**\n\nThe following setup tasks can be perfomed manually or by running the scripts\nincluded with this repo.\n\n- Change directory\n```\n$ cd \u003cproject_folder\u003e/docker-compose-elasticsearch/deploy-aws-v2\n```\n\n- Ensure the following prerequisites are ready: AWS account; AWS CLI installed \u0026\n  Configured; and AWS ECS CLI installed \u0026 profile configured.\n\n- If not already, configure the Amazon ECS CLI cluster for deploying this demo:\n  - As indicated above, we assume the ECS profile, `ecs-tutorial`, has been \n    configured and the `~/.ecs/credentials` file, has the following:\n```\nversion: v1\n[...]\necs_profiles:\n  ecs-tutorial:\n    aws_access_key_id: \u003creplace_with_actual_id\u003e\n    aws_secret_access_key: \u003creplace_with_actual_secret\u003e\n```  \n  - Create a ECS CLI cluster configuration, which defines the AWS region to use, \n    resource creation prefixes, and the cluster name to use with the Amazon ECS \n    CLI; using the `03_create_aws_ecs_cluster_config.sh`:\n```\n$ cd \u003cproject_folder\u003e\\aws-ecs-docker-php-01\\deploy-aws-v2\n$ ./03_create_aws_ecs_cluster_config.sh\nCreate a cluster ecs-ec2-tutorial, config ecs-ec2-tutorial, launch type EC2 in us-west-2\nINFO[0000] Saved ECS CLI cluster configuration ecs-ec2-tutorial.\n```\n  - Verify the local `~/.ecs/config` file contains the following:\n```\nversion: v1\n[...]\nclusters:\n  ecs-ec2-tutorial:\n    cluster: ecs-ec2-tutorial\n    region: us-west-2\n    default_launch_type: EC2\n[...]\n```\n\n- Setup cluster\n```\n$ cd \u003cproject_folder\u003e\\aws-ecs-docker-php-01\\deploy-aws-v2\n$ ./04_create_aws_ecs_cluster_create.sh\nEnter the SSH RSA key-pair?\n\u003creplace-with-real-keypair\u003e\nCreate aws cloud cluster based on cli config and profile...\nINFO[0001] Using recommended Amazon Linux 2 AMI with ECS Agent 1.61.3 and Docker version 20.10.13\nINFO[0001] Created cluster                               cluster=ecs-ec2-tutorial region=us-west-2\nINFO[0001] Waiting for your cluster resources to be created...\nINFO[0001] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS\nINFO[0062] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS\nINFO[0123] Cloudformation stack status                   stackStatus=CREATE_IN_PROGRESS\nVPC created: vpc-009636f1d0c0ad22b\nSecurity Group created: sg-0de3daafac2a77878\nSubnet created: subnet-0cda23b43024c34d2\nSubnet created: subnet-0831d526126a8f3bf\nCluster creation succeeded.\n```\n\n- Deploy\n```\n$ cd \u003cproject_folder\u003e\\aws-ecs-docker-php-01\\deploy-aws-v2\n$ ./07_create_aws_ecs_cluster_deploy.sh\ndeploy the cluster\nINFO[0000] Using ECS task definition                     TaskDefinition=\"deploy-aws-v2:2\"\nINFO[0000] Created Log Group foodtrucks in us-west-2\nWARN[0000] Failed to create log group foodtrucks in us-west-2: The specified log group already exists\nINFO[0000] Auto-enabling ECS Managed Tags\nINFO[0001] Starting container...                         container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es\nINFO[0001] Starting container...                         container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web\nINFO[0001] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=RUNNING lastStatus=PENDING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0001] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=RUNNING lastStatus=PENDING taskDefinition=\"deploy-aws-v2:2\"\nINFO[0013] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=RUNNING lastStatus=PENDING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0013] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=RUNNING lastStatus=PENDING taskDefinition=\"deploy-aws-v2:2\"\nINFO[0026] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=RUNNING lastStatus=PENDING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0026] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=RUNNING lastStatus=PENDING taskDefinition=\"deploy-aws-v2:2\"\nINFO[0038] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=RUNNING lastStatus=PENDING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0038] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=RUNNING lastStatus=PENDING taskDefinition=\"deploy-aws-v2:2\"\nINFO[0050] Started container...                          container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=RUNNING lastStatus=RUNNING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0050] Started container...                          container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=RUNNING lastStatus=RUNNING taskDefinition=\"deploy-aws-v2:2\"\n```\n\n- Check containers\n```\n$ cd \u003cproject_folder\u003e\\aws-ecs-docker-php-01\\deploy-aws-v2\n$ ./08_view_running_containers.sh\nName                                                   State    Ports                      TaskDefinition   Health\necs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web  RUNNING  35.92.75.208:80-\u003e5000/tcp  deploy-aws-v2:2  UNKNOWN\necs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es   RUNNING\n```\n\n- Cleanup, as discussed below\n\n\n#### CLEANUP\n\n- Delete the service so that it stops the existing containers and does not try \n  to run any more tasks. Then take down your cluster, which cleans up the \n  resources that you created earlier with ecs-cli up. Both tasks have been\n  included in the `11_cleanup_aws_ecs_cluster.sh` script:\n```\n$ cd \u003cproject_folder\u003e\\aws-ecs-docker-php-01\\deploy-aws-v2\n$ ./11_cleanup_aws_ecs_cluster.sh\nINFO[0000] Stopping container...                         container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web\nINFO[0000] Stopping container...                         container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es\nINFO[0000] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=STOPPED lastStatus=RUNNING\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0000] Describe ECS container status                 container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=STOPPED lastStatus=RUNNING taskDefinition=\"deploy-aws-v2:2\"\nINFO[0006] Stopped container...                          container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/web desiredStatus=STOPPED lastStatus=STOPPED\n taskDefinition=\"deploy-aws-v2:2\"\nINFO[0006] Stopped container...                          container=ecs-ec2-tutorial/43e0907cddc847c2a5ab475ab5a3fd8c/es desiredStatus=STOPPED lastStatus=STOPPED taskDefinition=\"deploy-aws-v2:2\"\nINFO[0000] Waiting for your cluster resources to be deleted...\nINFO[0000] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS\nINFO[0061] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS\nINFO[0122] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS\nINFO[0183] Cloudformation stack status                   stackStatus=DELETE_IN_PROGRESS\nINFO[0214] Deleted cluster                               cluster=ecs-ec2-tutorial\n```\n\n- Delete task definitions, `deploy-aws-v2`, from the AWS console; go to\n  \"Amazon Elastic Container Service \u003e Task Definitions\" page.\n  - Click the task definitions `deploy-aws-v2`\n  - On the `deploy-aws-v2` task definitions page, select the `deploy-aws-v2:2`\n    Task definition: revision, then \"Deregister\". That will delete the\n    `deploy-aws-v2` task\n  - Note: the name, `deploy-aws-v2`, was taken from the folder name where the\n    `docker-compose.yml` file resided.  \n\n- Delete the CloudWatch log group, `foodtrucks`, from the AWS Console, go to\n  \"CloudWatch \u003e Log groups\"\n\n- Delete the role name `ecsTaskExecutionRole` (if no longer needed);\n  use the \"AWS console \u003e IAM \u003e Access Management \u003e Roles\"\n  \n- Delete the AWS ECS profile `ecs-ec2-sffoodtrucks` (if no longer needed) from the local\n  `~/.ecs/config` file:\n```\nversion: v1\n[...]\nclusters:\n  ecs-ec2-sffoodtrucks:\n    cluster: ecs-ec2-sffoodtrucks\n    region: us-west-2\n    default_launch_type: FARGATE\n[...]\n```\n\n- The EC2 instance should have been terminated as well. It will still show on\n  the \"EC2 \u003e Instances\" for a while but should disappear eventually.\n\n## Issues to be investigated\n\n- [Resolved] Error during startup of `docker.elastic.co/elasticsearch/elasticsearch:8.3.3`\n```\norg.elasticsearch.ElasticsearchSecurityException: invalid configuration for xpack.security.transport.ssl - [xpack.security.transport.ssl.enabled] is not set, but the following settings have been configured in elasticsearch.yml : [xpack.security.transport.ssl.keystore.secure_password,xpack.security.transport.ssl.truststore.secure_password]\n        at org.elasticsearch.xcore@8.3.3/org.elasticsearch.xpack.core.ssl.SSLService.validateServerConfiguration(SSLService.java:648)\n        at org.elasticsearch.xcore@8.3.3/org.elasticsearch.xpack.core.ssl.SSLService.loadSslConfigurations(SSLService.java:612)\n        at org.elasticsearch.xcore@8.3.3/org.elasticsearch.xpack.core.ssl.SSLService.\u003cinit\u003e(SSLService.java:156)\n        at org.elasticsearch.xcore@8.3.3/org.elasticsearch.xpack.core.XPackPlugin.createSSLService(XPackPlugin.java:461)\n        at org.elasticsearch.xcore@8.3.3/org.elasticsearch.xpack.core.XPackPlugin.createComponents(XPackPlugin.java:310)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.node.Node.lambda$new$14(Node.java:668)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.plugins.PluginsService.lambda$flatMap$0(PluginsService.java:235)\n        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)\n        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)\n        at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)\n        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)\n        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)\n        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)\n        at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)\n        at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)\n        at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622)\n        at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.node.Node.\u003cinit\u003e(Node.java:681)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.node.Node.\u003cinit\u003e(Node.java:300)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.bootstrap.Bootstrap$5.\u003cinit\u003e(Bootstrap.java:230)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:230)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:224)\n        at org.elasticsearch.server@8.3.3/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)\nFor complete error details, refer to the log at /usr/share/elasticsearch/logs/elasticsearch.log\nERROR: Elasticsearch did not exit normally - check the logs at /usr/share/elasticsearch/logs/elasticsearch.log\n\nERROR: Elasticsearch exited unexpectedly\n```\n\n- This error is a known issue with the ECS with Fargate (serverless) deployment,\nand but it seems to be a very low priority (or not to fix) by aws.\nThe issue was reported:\n- https://stackoverflow.com/questions/62860516/how-to-increase-the-vm-max-map-count-in-aws-ecs-fargate\n- https://medium.com/@devfire/deploying-the-elk-stack-on-amazon-ecs-part-2-34c841e3b774\n\n\n## Refereces\n\n- [Docker Curriculum - MULTI-CONTAINER ENVIRONMENTS](https://docker-curriculum.com/#multi-container-environments)\n\n- [Deploying the ELK stack on AWS ECS, Part 1: Introduction \u0026 First Steps](https://medium.com/@devfire/deploying-the-elk-stack-on-amazon-ecs-dd97d671df06)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabepublic%2Fdocker-compose-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabepublic%2Fdocker-compose-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabepublic%2Fdocker-compose-elasticsearch/lists"}