-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (27 loc) · 906 Bytes
/
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
FROM julia:latest
# Webapp
# - install nodejs, npm, lighttpd
RUN apt update
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install lighttpd nodejs -y
# - copy lighttpd config to container
COPY lighttpd.conf /etc/lighttpd
# - bundling webapp
WORKDIR /webapp
COPY webapp/ .
RUN npm i
# NOTE: dont know why node-sass did not get installed after running `npm i`
RUN npm install --save-dev node-sass
RUN npm run build
RUN mv dist/* /var/www
# System
WORKDIR /ich
COPY system/ .
# NOTE: precompile the project
# there will be weird error happened with Faker during precompiling, ignore it!
RUN COMPILE=1 julia -e "using Pkg;Pkg.activate(\".\");Pkg.instantiate();Pkg.precompile();"
# Expose both webserver & websocket server
EXPOSE 4444
EXPOSE 8081
# running the CLI: start webserver then run the cli app
ENTRYPOINT service lighttpd start && julia --project=. src/consistent_hashing.jl