{"action":"created","issue":{"url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/7","repository_url":"https://api.github.com/repos/Algram/ytdl-webserver","labels_url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/7/comments","events_url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/7/events","html_url":"https://github.com/Algram/ytdl-webserver/pull/7","id":362937471,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NTA2ODAx","number":7,"title":"Multistage build to create an image for running the webapp 54MB compressed","user":{"login":"mauritsvdvijgh","id":5075001,"node_id":"MDQ6VXNlcjUwNzUwMDE=","avatar_url":"https://avatars0.githubusercontent.com/u/5075001?v=4","gravatar_id":"","url":"https://api.github.com/users/mauritsvdvijgh","html_url":"https://github.com/mauritsvdvijgh","followers_url":"https://api.github.com/users/mauritsvdvijgh/followers","following_url":"https://api.github.com/users/mauritsvdvijgh/following{/other_user}","gists_url":"https://api.github.com/users/mauritsvdvijgh/gists{/gist_id}","starred_url":"https://api.github.com/users/mauritsvdvijgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauritsvdvijgh/subscriptions","organizations_url":"https://api.github.com/users/mauritsvdvijgh/orgs","repos_url":"https://api.github.com/users/mauritsvdvijgh/repos","events_url":"https://api.github.com/users/mauritsvdvijgh/events{/privacy}","received_events_url":"https://api.github.com/users/mauritsvdvijgh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-23T12:08:29Z","updated_at":"2018-09-23T15:40:38Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Algram/ytdl-webserver/pulls/7","html_url":"https://github.com/Algram/ytdl-webserver/pull/7","diff_url":"https://github.com/Algram/ytdl-webserver/pull/7.diff","patch_url":"https://github.com/Algram/ytdl-webserver/pull/7.patch"},"body":"Based on: https://github.com/Algram/ytdl-webserver/pull/6 (so merge after that one if you want it I suppose).\r\n\r\nAdds a multistage build, meaning that the image that runs the webapp is 54MB compressed as opposed to 500MB. The dev dependencies, caches and some other bloat are not in the final image in this one.\r\n\r\nYou can still build the dev image using:\r\n```\r\ndocker build --target dev -t mauritso/ytdl-webserver-dev .\r\n```\r\n\r\nrun only image using:\r\n```\r\ndocker build -t mauritso/ytdl-webserver .\r\n```\r\n\r\non the docker hub [here](https://hub.docker.com/r/mauritso/ytdl-webserver/tags/)\r\n\r\nyou can  try the image using:\r\n```\r\ndocker run -p 3000:3000 mauritso/ytdl-webserver\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/comments/423825404","html_url":"https://github.com/Algram/ytdl-webserver/pull/7#issuecomment-423825404","issue_url":"https://api.github.com/repos/Algram/ytdl-webserver/issues/7","id":423825404,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzgyNTQwNA==","user":{"login":"austinpray","id":2192970,"node_id":"MDQ6VXNlcjIxOTI5NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/2192970?v=4","gravatar_id":"","url":"https://api.github.com/users/austinpray","html_url":"https://github.com/austinpray","followers_url":"https://api.github.com/users/austinpray/followers","following_url":"https://api.github.com/users/austinpray/following{/other_user}","gists_url":"https://api.github.com/users/austinpray/gists{/gist_id}","starred_url":"https://api.github.com/users/austinpray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austinpray/subscriptions","organizations_url":"https://api.github.com/users/austinpray/orgs","repos_url":"https://api.github.com/users/austinpray/repos","events_url":"https://api.github.com/users/austinpray/events{/privacy}","received_events_url":"https://api.github.com/users/austinpray/received_events","type":"User","site_admin":false},"created_at":"2018-09-23T15:40:38Z","updated_at":"2018-09-23T15:40:38Z","author_association":"CONTRIBUTOR","body":"@mauritsvdvijgh haha yep I deleted the package-lock comment like 5 seconds after writing it. When I checked this branch out locally and saw the non-diff view it was right in front of my face.\r\n\r\nBtw was just playing around to try to get node-sass to work and stuff like this doesn't work:\r\n\r\n```diff\r\ndiff --git a/Dockerfile b/Dockerfile\r\nindex a99371f..bd3a58b 100644\r\n--- a/Dockerfile\r\n+++ b/Dockerfile\r\n@@ -4,11 +4,14 @@ WORKDIR /home/app\r\n EXPOSE 3000\r\n CMD [ \"npm\", \"start\" ]\r\n \r\n+ENV SASS_BINARY_DIR /usr/lib\r\n+\r\n RUN apk add --update --no-cache \\\r\n         python3 \\\r\n         ffmpeg \\\r\n         nodejs \\\r\n         nodejs-npm \\\r\n+        libsass \\\r\n         ca-certificates && \\\r\n     find / -type d -name __pycache__ -exec rm -r {} +   && \\\r\n     rm -r /usr/lib/python*/ensurepip                    && \\\r\n\r\n```\r\n\r\nJust gotta use node-sass@4.9.3 I guess"}}
{"actor":{"display_login":"austinpray"}}