| 123456789101112131415161718192021222324252627 |
- FROM phusion/passenger-nodejs:2.5.1
- ###########################################################################
- # install & build
- ###########################################################################
- RUN node -v
- RUN apt-get update -yqq && apt-get clean
- RUN npm i -g yarn@1.22 pm2@5.2
- RUN useradd -m ulearn
- RUN mkdir /home/ulearn/lms_resources && mkdir /home/ulearn/.uclms
- RUN chmod 0777 /home/ulearn/lms_resources
- RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl && chmod a+x kubectl && mv ./kubectl /usr/local/bin/kubectl
- RUN npm i -g pm2@4.2.1
- WORKDIR /home/ulearn
- COPY current/ ./
- COPY entrypoint.sh .
- RUN yarn install
- RUN NODE_OPTIONS=--max_old_space_size=8192 npm run compile && chown -R root:ulearn build && chmod -R ga+w build
- ###########################################################################
- # run
- ###########################################################################
- EXPOSE 23000
- CMD ["/home/ulearn/entrypoint.sh"]
|