{"id":21170263,"url":"https://github.com/danieldev0724/django-terraform-ecs","last_synced_at":"2026-04-18T11:03:34.183Z","repository":{"id":188892015,"uuid":"663113642","full_name":"danieldev0724/django-terraform-ecs","owner":"danieldev0724","description":"Production ready deployment package of Django-Postgres-Jenkins-Terraform. ","archived":false,"fork":false,"pushed_at":"2023-07-06T15:23:12.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T10:51:01.145Z","etag":null,"topics":["django","docker-compose","jenkin","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danieldev0724.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-06T15:22:21.000Z","updated_at":"2023-07-08T16:46:22.000Z","dependencies_parsed_at":"2023-08-17T11:09:23.217Z","dependency_job_id":null,"html_url":"https://github.com/danieldev0724/django-terraform-ecs","commit_stats":null,"previous_names":["danieldev0724/django-terraform-ecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-terraform-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-terraform-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-terraform-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieldev0724%2Fdjango-terraform-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieldev0724","download_url":"https://codeload.github.com/danieldev0724/django-terraform-ecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243616748,"owners_count":20319952,"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":["django","docker-compose","jenkin","terraform"],"created_at":"2024-11-20T15:57:47.134Z","updated_at":"2025-10-08T12:30:10.819Z","avatar_url":"https://github.com/danieldev0724.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform - Docker - Django Production Deployment\n\nThis repository contains the production grade deployment of a Django application using Terraform and Docker Compose. The deployment includes a Postgres database as a Docker container.\n\n## Prerequisites\n\n- [Terraform](https://www.terraform.io/downloads.html)\n- [Docker](https://docs.docker.com/install/)\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\n## Postgres Docker Image\n\nThe Postgres database used in this deployment is from the official [Postgres Docker Image](https://hub.docker.com/_/postgres).\n\n## Django and Psycopg2 Installation\n\nThe Django application uses the [Psycopg2 library](https://www.psycopg.org/docs/install.html) for interacting with the Postgres database. Please refer to the official Psycopg2 documentation for installation instructions.\n\n## Terraform Configuration\n\nThe Terraform configuration files are located in the `deploy` directory. The `main.tf` file contains the definition of the resources to be deployed, including the Postgres container and the Django application.\n\n## AWS Services Used\n\n- Amazon Elastic Container Service (ECS)\n  ECS is a fully managed container orchestration service that makes it easy to run, stop, and manage Docker containers on a cluster.\n\n- Virtual Private Network (VPN)\n  VPN provides a secure connection between your network and the AWS network.\n\n- Public Subnets\n  Public subnets are used for resources that need to be directly accessible from the Internet, such as a load balancer.\n\n- Private Subnets\n  Private subnets are used for resources that should not be directly accessible from the Internet, such as database instances.\n\n## ECS (Amazon Elastic Container Service) provides the following benefits when used with Django and Docker:\n\n1. Scalability: ECS can automatically scale the number of containers to handle changes in demand, without manual intervention.\n\n2. Availability: ECS provides high availability through placement strategies and resource management, ensuring that containers are always running and accessible.\n\n3. Cost-effective: ECS offers a cost-effective solution for managing containers, with pricing based on the number of containers, data transfer, and storage.\n\n4. Integration with AWS Services: ECS integrates with other AWS services, such as EC2, RDS, and Elastic Load Balancing, allowing for seamless deployment and management of containers in the cloud.\n\n5. Security: ECS provides secure access to containers through VPCs and security groups, ensuring that only authorized users have access to the containers.\n\n6. Management: ECS provides a centralized management console that makes it easy to monitor, manage, and update containers, making it a great choice for large-scale production deployments.\n\n\n\n## Docker Compose Configuration\n\nThe Docker Compose configuration file, `docker-compose.yml`, is located in the root directory of the repository. It contains the definition of the services that make up the deployment, including the Postgres database and the Django application.\n\n## Deployment\n\nTo deploy the application, first initialize Terraform:\n```\nterraform init\nterraform plan\nterraform apply\n```\n\n\n\n\n## Conclusion\n\nThis repository demonstrates a production-grade deployment of a Django application using Terraform and Docker Compose. With this configuration, the application can be easily scaled and managed in a production environment.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldev0724%2Fdjango-terraform-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieldev0724%2Fdjango-terraform-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieldev0724%2Fdjango-terraform-ecs/lists"}