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.
Configure general settings and details → Click on "Create Repository."
In this case, we set it as Public.
You can see the repository has been created.
This completes the repository creations!
Image Registration
The next step is to register the image with Amazon ECR.
Select repository → Click "Show push command."
Copy the command as it appears.
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
docker tag kartoza/geoserver:latest public.ecr.aws/xxxxx/sample:latest
docker push public.ecr.aws/xxxxx/sample:latest
After the push is complete, click on the target repository.
You will see that the image has been registered.
That completes the registration of the image!
Deployment
Finally, how to deploy with AWS App Runner.
Click AWS Management Console → AWS App Runner.
Click on "Create App Runner Service."
Configure source and deploy settings → Click "Next."
This time, specify the image configured in ECR Public.
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.
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.
You can see GeoServer is up and running!
References
Amazon ECR
AWS App Runner
GeoServer
Top comments (1)
Can we scale it vertically? Also how do you configure EFS for data directory and geowebcache dir?