diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bb532c0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:jessie + +MAINTAINER + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && \ + apt-get -q install -y erlang-nox make git wget && \ + apt-get clean + +RUN useradd -d /opt/fipes fipes + + +ADD Makefile /opt/fipes/ +ADD erlang.mk /opt/fipes/ +ADD include /opt/fipes/include +ADD priv /opt/fipes/priv +ADD public /opt/fipes/public +ADD src /opt/fipes/src + +RUN chown -R fipes:fipes /opt/fipes + +USER fipes +WORKDIR /opt/fipes +RUN make + +ENV HOME /opt/fipes +CMD erl -sname fipes@localhost -pa ebin -pa deps/*/ebin -boot start_sasl -s fipes + +EXPOSE 3473 diff --git a/README.md b/README.md index de0fd8e..e1bab2b 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,20 @@ and launch the server with: $ make dev +### Docker + +The fipes service can be handle by docker. + +Build the image : + + docker build -t fipes . + +Run the service : + + docker run -t -d -p 3473:3473 fipes + +Now, the service run on the port 3473, you should plug it to something wich handle SNI and Websocket, like Nginx or HAproxy. + ## Bugs/Pitfalls * Fipes is not p2p. However no data is stored on the server