QTHFTPDXPN4HVSFQBRUHDQXMXQ3S5KW3TSEYGM7IBYFZROJSFIIAC
3TAMXHCZCOX6G3PNSWI74WJSR3J7FPGYBL67Y3TIJXW5HC5ZFRBQC
HO2PFRABW6BBTE4MUKUTEGXCMJS46WGVBCNWOHO4OL52DVAB4YDAC
4ZLEDBK7VGLKFUPENAFLUJYNFLKFYJ3TREPQ7P6PKMYGJUXB55HQC
SOIAMXLWIB5RIEMKXUFMBSE2SKQQTMHYSW3DKUX6GEV4VNOQVHAQC
DXIGERDTERUIG7QHHRPKTSJHSQEPJPDJVLUW7YVC7URXBQ4ZJVOAC
M3KUPGZK2UTW4FG3Q632K7P7MI4FVWD5TTIP45UTI3E72UKOWJBAC
7VGYLTMURLVSVUYFW7TCRZTDQ6RE2EPSPPA43XKHDOBFWYVVSJHQC
EW2XN7KUMCAQNVFJJ5YTAVDZCPHNWDOEDMRFBUGLY6IE2HKNNX5AC
T3X4DRLFS4WQFBR3BULJ7F2TLXD47XJX6ZQ3CJGOH2VYHFBHUQ6QC
RUN apt-get install -y --no-install-recommends nodejs
RUN apt-get install -y --no-install-recommends npm
RUN npm install -g npm bower pulp
# RUN apt-get install -y --no-install-recommends nodejs
# RUN apt-get install -y --no-install-recommends npm
# RUN npm install -g npm bower pulp
RUN ln -s /usr/bin/nodejs /usr/local/bin/node
# RUN ln -s /usr/bin/nodejs /usr/local/bin/node
# Install ghc globally so that we don't have to reinstall it
# whenever we change stack.yaml or aftok.cabal
ADD ./docker/global-stack.yaml /root/.stack/global-project/stack.yaml
RUN stack --resolver lts-7.16 setup
# Globally install database migrations tool
RUN stack install dbmigrations
# Set up database migrations
WORKDIR /opt
ADD ./docker/global-stack.yaml /root/.stack/global-project/stack.yaml
RUN stack install dbmigrations
ADD ./migrations /opt/aftok/migrations
# Add the main shell script that starts the aftok server
RUN mkdir /etc/service/aftok
ADD ./docker/aftok-server.sh /etc/service/aftok/run