DEV Community

Cover image for Build a GeoServer with AWS App Runner and Amazon ECR
Yasunori Kirimoto for AWS Heroes

Posted on

Build a GeoServer with AWS App Runner and Amazon ECR

img

I built a GeoServer with AWS App Runner and Amazon ECR. πŸŽ‰

The following is a detailed explanation.

  • Repository creation
  • Image registration
  • Deployment

Repository creation

First, here is how to create a repository in Amazon ECR.

Click AWS Management Console β†’ Elastic Container Registry.
img

Click on "Create Repository."
img

Configure general settings and details β†’ Click on "Create Repository."
In this case, we set it as Public.
img

You can see the repository has been created.
img

This completes the repository creations!

Image Registration

The next step is to register the image with Amazon ECR.

Select repository β†’ Click "Show push command."
img

Copy the command as it appears.
img

Execute the command with AWS CLI to push the image to the repository.
In this case, we used the GeoServer Docker image "kartoza/geoserver."



aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/xxxxx


Enter fullscreen mode Exit fullscreen mode


docker tag kartoza/geoserver:latest public.ecr.aws/xxxxx/sample:latest


Enter fullscreen mode Exit fullscreen mode


docker push public.ecr.aws/xxxxx/sample:latest


Enter fullscreen mode Exit fullscreen mode

img

After the push is complete, click on the target repository.
img

You will see that the image has been registered.
img

That completes the registration of the image!

Deployment

Finally, how to deploy with AWS App Runner.

Click AWS Management Console β†’ AWS App Runner.
img

Click on "Create App Runner Service."
img

Configure source and deploy settings β†’ Click "Next."
This time, specify the image configured in ECR Public.
img

Configure service settings β†’ Click "Next.
The default values for optional memory and CPU are low, so increase them to the range where GeoServer can run. Other default values are used.
img

Click "Create and Deploy.
img

Wait for a while, and then the environment construction will be completed.
The URL is displayed in detail, so add "/geoserver" and access it with a browser.
img

You can see GeoServer is up and running!
img

References
Amazon ECR
AWS App Runner
GeoServer

Top comments (1)

Collapse
 
dotsource profile image
dotsource • Edited

Can we scale it vertically? Also how do you configure EFS for data directory and geowebcache dir?