mjolnir/Dockerfile
gnuxie 604c3f5f1c Change entrypoint in Dockerfile so that we can start the appservice.
We could have used another Dockerfile for the appservice,
extending the exising one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

This solution is much simpler, backwards compatible, and conscious about the future.
2022-11-15 17:05:30 +00:00

19 lines
406 B
Docker

# We can't use alpine anymore because crypto has rust deps.
FROM node:16-slim
COPY . /tmp/src
RUN cd /tmp/src \
&& yarn install \
&& yarn build \
&& mv lib/ /mjolnir/ \
&& mv node_modules / \
&& mv mjolnir-entrypoint.sh / \
&& cd / \
&& rm -rf /tmp/*
ENV NODE_ENV=production
ENV NODE_CONFIG_DIR=/data/config
CMD ["bot"]
ENTRYPOINT ["./mjolnir-entrypoint.sh"]
VOLUME ["/data"]