mirror of
https://github.com/lovasoa/whitebophir
synced 2024-11-10 06:24:17 +00:00
enhance the Dockerfile with default CMD to start
This commit is contained in:
parent
2691cc9397
commit
b6a8b754a8
1 changed files with 4 additions and 1 deletions
|
@ -1,8 +1,9 @@
|
|||
FROM node:10-alpine
|
||||
|
||||
WORKDIR /opt/app
|
||||
|
||||
COPY . /opt/app
|
||||
ENV PORT=80
|
||||
VOLUME /opt/app/server-data
|
||||
|
||||
RUN touch /usr/bin/start.sh # this is the script which will run on start
|
||||
|
||||
|
@ -24,3 +25,5 @@ RUN echo 'npm install --production' >> /usr/bin/start.sh
|
|||
|
||||
# npm start, make sure to have a start attribute in "scripts" in package.json
|
||||
RUN echo 'npm start' >> /usr/bin/start.sh
|
||||
|
||||
CMD ["/bin/sh","/usr/bin/start.sh"]
|
||||
|
|
Loading…
Reference in a new issue