Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds AWS ElasticBeanstalk deploy instructions to the README #44

Conversation

RobertoSchneiders
Copy link

No description provided.

@edgurgel
Copy link
Owner

The problem with this approach is that you are including your secret inside a docker image and if you want to change the configuration you need to generate a new docker image. IMHO the production configuration shouldn't be part of your image.

@RobertoSchneiders
Copy link
Author

In this case, AWS Elastic Beanstalk will build your image on every deploy. If you want to change the secret, you only have to change poxa.conf and re-deploy. In case you have configured the deploy via CI, you only have to push the changes on the config file. You don't need to rebuild your image every time, ElasticBeanstalk will do that.

However, I agree. I don't like to have these configs in a file on the repository. It would be better to configure this on some environment variable on the server. But I can't find a way to do this yet, with docker. So I created the #45 issue exactly because of that.

@RobertoSchneiders
Copy link
Author

I created a gist explaining how to configure Poxa with SSL on EB. If you think it's relevant, we can put in the documentation or link it.

@edgurgel
Copy link
Owner

Do you mind create a wiki page with this information? I think this is valuable and I appreciate that you shared :)

I agree that environment variables are simpler to configure (and usually the "right way" for AWS Beanstalk and ECS) but as I mentioned at #45 it will (soon) be really hard to configure Poxa with environment variables.

I'm also investigating how other projects handle this case (Rabbitmq and Riak for example)

@RobertoSchneiders
Copy link
Author

Of course. Let me get this straight. Do you want me to put all the Elastic Beanstalk deploy instructions, including the content of this PR, on a wiki, right?

About the environment variables, I understand your concerns. I'm not familiar with this code and even elixir, so, I don't think I can help right now, but, if I have any ideas I will let you know.

@edgurgel
Copy link
Owner

Of course. Let me get this straight. Do you want me to put all the Elastic Beanstalk deploy instructions, including the content of this PR, on a wiki, right?

Yes!

@edgurgel
Copy link
Owner

I think I found the perfect example:

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecstutorial.html#create_deploy_docker_ecstutorial_code

This example includes files and mount them as part of the volume definition. It's using multiple containers, but I imagine that single container should be pretty similar.

@RobertoSchneiders
Copy link
Author

Interesting, I will try that.

Thanks

@RobertoSchneiders
Copy link
Author

I managed to make the deploy work with this config:

Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "edgurgel/poxa",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": "80"
    }
  ],
  "Volumes": [
    {
      "HostDirectory": "/var/app/current/poxa.conf",
      "ContainerDirectory": "/app/releases/0.4.3/poxa.conf"
    }
  ],
  "Logging": "/var/log/nginx"
}

Not sure if this was what you are expecting @edgurgel.

@edgurgel
Copy link
Owner

That's awesome! That's exactly what I was expecting 👍

@RobertoSchneiders
Copy link
Author

Ok, I will write the Wiki page.

@edgurgel
Copy link
Owner

Thanks a lot, @RobertoSchneiders 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants