Can I use DHIS2 with custom docker and host it on AWS?

I learnt that I can use AWS for hosting. Has anyone use custom docker on AWS and does it work?

Hi @jetisco4u
Yes, you can use DHIS2 with a custom Docker configuration and host it on AWS. Docker provides a convenient way to package and distribute applications, and it can be used to containerize DHIS2 for deployment. AWS offers various services for hosting Docker containers, such as Amazon Elastic Container Service (ECS) or Amazon Elastic Kubernetes Service (EKS).

Many organizations and individuals have successfully deployed DHIS2 using custom Docker configurations on AWS. Docker allows you to create a container image that includes all the necessary dependencies and configurations for running DHIS2. You can then use AWS services to manage and scale your Docker containers.

When hosting DHIS2 with Docker on AWS, there are a few key considerations:

  1. Choose the appropriate AWS service: Evaluate the different AWS container services, such as ECS or EKS, to determine which one aligns best with your requirements, budget, and expertise.

  2. Configure Docker and container orchestration: Set up your Docker configuration with the necessary DHIS2 components, including the database, web server, and DHIS2 WAR file. You can utilize Docker Compose or other container orchestration tools to define and manage your container environment.

  3. Infrastructure provisioning: Ensure that you have the necessary AWS resources provisioned, such as virtual machines (EC2 instances), networking (VPC, subnets), storage (EBS, S3), and load balancers (ELB or ALB), depending on your chosen AWS service.

  4. Security and access control: Implement appropriate security measures, including network security groups, access control policies, and encryption of sensitive data. Consider integrating AWS IAM (Identity and Access Management) for user authentication and authorization.

  5. Monitoring and scalability: Leverage AWS monitoring and logging services, such as Amazon CloudWatch, to track the performance and health of your DHIS2 deployment. Configure auto-scaling policies to handle increased load or traffic.

It is important to note that deploying and managing DHIS2 with Docker on AWS requires technical knowledge and expertise in both DHIS2 and AWS services. It is recommended to consult DHIS2 documentation, AWS documentation, and possibly seek guidance from DHIS2 and AWS experts to ensure a successful deployment.

Additionally, there are DHIS2-specific Docker images available, such as the official DHIS2 Docker images provided by the DHIS2 development team. These images come preconfigured with DHIS2 and can be a good starting point for Docker deployments.

Let us know if you have further questions
-Moses

2 Likes

@moses_mwale thank you for your detail response.

Currently I deployed a DHIS2 instance in production in a custom docker container in a virtual server. I am thinking of encouraging the client to use AWS because the current server is difficult to scale. There are few takeaways from your response.

I am currently using docker compose and it’s working fine.

Number 1, 3, 4 and 5 points above bother around AWS services. I have limited knowledge of AWS but I am taking a course on it so I can catch up. I will give it a go with a free tier to see what I come up with.

If I have any other question I will ask in this thread.

Sounds great. We we are here to help.

2 Likes