Skip to content

Instantly share code, notes, and snippets.

@buremba
Created July 14, 2017 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buremba/a2ad4c3b51794a2ab95a4434b837c7d4 to your computer and use it in GitHub Desktop.
Save buremba/a2ad4c3b51794a2ab95a4434b837c7d4 to your computer and use it in GitHub Desktop.
Dockerfile
FROM maven:3-jdk-8
MAINTAINER Burak Emre Kabakci "emre@rakam.io"
WORKDIR /var/app
RUN git clone https://github.com/rakam-io/rakam.git
RUN cd rakam && mvn install -DskipTests
RUN echo 'org.rakam=INFO\n\
io.netty=INFO' > log.properties
RUN [ -s config.properties ] || (echo "store.adapter=postgresql\n\
store.adapter.postgresql.url=postgres://USERNAME:PASSWORD@YOUR_POSTGRESQL_HOST:5432/YOUR_DATABASE\n\
plugin.user.enabled=true\n\
event.stream.enabled=true\n\
event-explorer.enabled=true\n\
custom-data-source.enabled=true\n\
user.funnel-analysis.enabled=true\n\
plugin.user.enable-user-mapping=true\n\
user.retention-analysis.enabled=true\n\
plugin.geoip.enabled=true\n\
plugin.user.storage=postgresql\n\
event-stream=server\n\
http.server.address=0.0.0.0:9999\n\
plugin.user.storage.identifier-column=id\n\
plugin.geoip.database.url=file://tmp/GeoLite2-City.mmdb\n" > config.properties)
RUN apt-get update \
# Rakam can automatically download & extract the database but we do this
# at compile time of the container because it increases the start time of the containers.
&& wget -P /tmp http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz \
&& gzip -d /tmp/GeoLite2-City.mmdb.gz
WORKDIR /var/app/rakam
EXPOSE 9999
#-Dlog.enable-console=false
#-Dlog.output-file=../logs/app.log
ENTRYPOINT rakam/target/rakam-*-bundle/rakam-*/bin/launcher run --config ../config.properties -Denv=RAKAM_CONFIG
RUN apt-get clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment