Caddy with AWS Elastic Beanstalk

1. The problem I’m having:

"I’ve checked below article, but they’re using Docker to build and upload code to AWS EBS. I’m running a Django application that’s directly uploaded and deployed. Now, I need to incorporate Caddy into it. Currently, we have 4 EC2 instances with batch deployment.

I need Caddy to function within the same process, so the ‘eb deploy’ command should handle its setup. We serve about 2000 clients with active traffic around 1M per month, as we’re building a white-labeling application. I could use Docker, but I require the same workflow within AWS."

If anyone could personally help me with the architecture would be helpful for our system. I can’t find the proper docs for this.

5. Links to relevant resources:

I’m not sure how to help here. You didn’t really ask any specific questions.

What are you having trouble with, specifically?

I don’t use AWS, so I can’t give any specific advice regarding that.

image

Reference document, we have nginx config in this aws, how can i use the same config with caddy. There is no docs, is it not sopported? If so what is the alternative.

I need to build the same way as in the picture.

Caddy can do pretty much anything nginx can do.

Do you have any specific questions? Like I said I’m not experienced with AWS (and I can’t reasonably spend the time to dive into their docs, I’m a volunteer) so unless you have something specific you’re having trouble with, I’m not sure how to help you.

Configuring nginx

Elastic Beanstalk uses nginx as the default reverse proxy to map your application to your Elastic Load Balancing load balancer. Elastic Beanstalk provides a default nginx configuration that you can extend or override completely with your own configuration.

Note

When you add or edit an nginx .conf configuration file, be sure to encode it as UTF-8.

To extend the Elastic Beanstalk default nginx configuration, add .conf configuration files to a folder named .platform/nginx/conf.d/ in your application source bundle. The Elastic Beanstalk nginx configuration includes .conf files in this folder automatically.

~/workspace/my-app/
|-- .platform
|   `-- nginx
|       `-- conf.d
|           `-- myconf.conf
`-- other source files

To override the Elastic Beanstalk default nginx configuration completely, include a configuration in your source bundle at .platform/nginx/nginx.conf:

Where i can use this default in AWS EBS, how can i override with Caddy config.

Your question is more of a “how do I use Elastic Beanstalk” question rather than “how do I use Caddy”. I can’t really answer that.

Probably best if you ask AWS support communities for how to get started.

I have somehow managed to install the flow,

Now i am planning to use a module since download option is not working, I have to use xcaddy but in Amazon AMI its not working. Is there any guide that i can use to build in local and install in cloud, Since i dont prefer to install go and process the build in cloud.

What do you mean? Please elaborate.

In what way is it not working? Please refrain from saying “not working”, it’s useless, it gives no information for troubleshooting.

See Build from source — Caddy Documentation, there’s really nothing special to it. Just make sure you build with the same GOOS/GOARCH as the target system.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.