devops

andrewtropin 2016-09-13T10:27:05.000004Z

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

jakemcc 2016-09-13T14:55:19.000005Z

@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.

jakemcc 2016-09-13T14:55:49.000006Z

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

andrewtropin 2016-09-13T18:49:52.000007Z

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

jakemcc 2016-09-13T18:53:25.000008Z

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.