let Docker container generate new hafas-client install IDs 🐛

see derhuerst/bvg-rest#4
This commit is contained in:
Jannis R 2019-03-27 12:19:50 +01:00
parent 6c2d2c90f2
commit ee70e6215e
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5
2 changed files with 10 additions and 3 deletions

View file

@ -3,11 +3,14 @@ FROM node:alpine
WORKDIR /app WORKDIR /app
ADD . /app ADD . /app
RUN npm install --production RUN apk add --update git bash && \
npm install --production && \
apk del git && \
rm -rf /tmp/* /var/cache/apk/*
EXPOSE 3000 EXPOSE 3000
ENV HOSTNAME db.transport.rest ENV HOSTNAME 3.db.transport.rest
ENV PORT 3000 ENV PORT 3000
CMD ["npm", "start"] CMD ["/bin/sh", "docker-entrypoint.sh"]

4
docker-entrypoint.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
npm explore hafas-client -- npm run install
npm start