Fork me on GitHub
#devops
<
2016-09-13
>
andrewtropin10:09:05

hey guys. Can anyone suggest article about deploying clojure+postgre using docker containers and aws ec2/ec2cs/rds?

jakemcc14:09:19

@andrewtropin can’t recommend anything specific, but if you’re using RDS you don’t need to deploy postgres, just configure your environment to talk to whatever postgres instance you setup. I both have Clojure code running in AWS in docker container and just as a jar. Both setups are using ElasticBeanstalk.

jakemcc14:09:49

@andrewtropin Amazon has documentation around those setups (though, not specific to clojure).

andrewtropin18:09:52

@jakemcc Thanks for information. Can you share you Dockerfile? How you built docker image? from ci?

jakemcc18:09:25

FROM java:8

RUN apt-get update && apt-get -y upgrade

RUN mkdir -p /ic

WORKDIR /ic

COPY target/ic-standalone.jar /ic/ic-standalone.jar
COPY config.edn /ic/config.edn

CMD ["java", "-Dlog4j.configuration=log4j.properties", "-server", "-Xms4g", "-Xmx4g", "-jar", "ic-standalone.jar"]
@andrewtropin Dockerfile that becomes out production artifact is above. CI builds images and pushes to an AWS container registry.