Closed AlJaMa closed 6 years ago
You can always have a Dockerfile specific for release that is separate. On Tue, 17 Oct 2017 at 22:21, Michael Lavacca notifications@github.com wrote:
@mclavacca commented on this pull request.
In Dockerfile https://github.com/alvarcarto/url-to-pdf-api/pull/14#discussion_r145259754 :
+ +RUN apt-get update && apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget && rm -r /var/lib/apt/lists/* + +# Create app directory +WORKDIR /usr/src/app + +# Install app dependencies +COPY package.json . + +RUN npm install + +# Bundle app source +COPY . . + +EXPOSE 9000 +CMD [ "npm", "start" ]
For production this should be changed to:
CMD [ "node", "src/index.js" ]
This coincides with @bweston92 https://github.com/bweston92's suggestion https://github.com/alvarcarto/url-to-pdf-api/pull/14/commits/df67d85c79927f2bd06458c869341855197210e7?diff=unified#r143133180 to make this production-ready (therefore lacking the nodemon package which the npm start command uses).
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/alvarcarto/url-to-pdf-api/pull/14#pullrequestreview-70034922, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrq2fAnmW_C5BFUqAjo9p8VpiGlyEnHks5stRpggaJpZM4PvyX9 .
Docker is a great tool but this PR wasn't fixed after a few suggestions. I don't want to introduce maintenance overhead with duplicate environment variables. In general, docker-local parity is not on the level I would want it to be. This is why I closed this PR. I'm open to a new PR which fixes these issues.
A quick PR to allow this to add docker to the list of ways to run this service.