forked from rakam-io/rakam-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (32 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM maven:3-jdk-8
MAINTAINER Burak Emre Kabakci "[email protected]"
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://rakam:dummy@rakam-db:5432/rakam\n\
plugin.user.enabled=true\n\
real-time.enabled=true\n\
event.stream.enabled=true\n\
event-explorer.enabled=true\n\
user.funnel-analysis.enabled=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 && (env | grep RAKAM_CONFIG_ | awk '{gsub(/\_/,".",$0); print substr(tolower($0), 14)}' >> 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