3wc 6e964a69a7 Use separate entrypoint to combine compose files
Now, when you run `docker compose up`, it'll check for a `conf`
directory during start-up, and run `node install` (with a bunch of
options based on env vars). If not, it'll run `node update`.

This means that the separate `docker-compose.setup.yml` is no longer
needed, and that this plays nice with docker swarm mode.
2020-10-02 14:21:50 +02:00

34 lines
862 B
Docker

FROM node:12.18.4-stretch
ENV AAT_VER=0.10.4
RUN apt-get update && apt-get install -y \
build-essential \
ffmpeg libavcodec-dev libavdevice-dev\
git nfs-common\
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# global npm dependencies
RUN npm install -g grunt-cli \
&& npm install -g adapt-cli
RUN cd / \
&& wget -q https://github.com/adaptlearning/adapt_authoring/archive/v${AAT_VER}.tar.gz \
&& tar -xzf v${AAT_VER}.tar.gz \
&& mv adapt_authoring-${AAT_VER} adapt_authoring \
&& rm v${AAT_VER}.tar.gz
WORKDIR /adapt_authoring
# 3wc: unfortunately the installer script then removes the node_modules directory
# https://github.com/adaptlearning/adapt_authoring/blob/master/lib/installHelpers.js#L647
RUN npm install --production
EXPOSE 5000
COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["node", "server"]