{"action":"created","comment":{"url":"https://api.github.com/repos/izderadicka/audioserve/pulls/comments/244942002","pull_request_review_id":188938255,"id":244942002,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDk0MjAwMg==","diff_hunk":"@@ -1,61 +1,58 @@\n-FROM debian:stretch-slim AS build\n+FROM rust:slim AS build\n MAINTAINER Ivan <ivan@zderadicka.eu>\n \n ARG FEATURES\n \n-RUN apt -o Acquire::https::No-Cache=True -o Acquire::http::No-Cache=True update &&\\\n-    apt-get install -y pkg-config openssl libssl-dev libtag1-dev libtagc0-dev curl yasm build-essential wget libbz2-dev zlib1g-dev &&\\\n-    curl -sL https://deb.nodesource.com/setup_8.x | bash - &&\\\n-    apt-get install -y nodejs \n-\n-COPY . /audioserve_src\n-\n-RUN curl https://sh.rustup.rs -sSf | sh -s -- -y\n-\n-RUN mkdir ffmpeg-static &&\\\n-    curl -sL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJv -C ffmpeg-static --strip-components=1 --wildcards \"*/ffmpeg\" &&\\\n-    cp /ffmpeg-static/ffmpeg /usr/bin\n+RUN apt-get update && \\\n+    apt-get install -y \\\n+    curl \\\n+    libbz2-dev \\\n+    libssl1.0-dev \\\n+    libtag1-dev \\\n+    libtagc0-dev \\\n+    openssl \\\n+    pkg-config \\\n+    yasm && \\\n+    mkdir ffmpeg-static && \\\n+    curl -sL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | \\\n+    tar xJv -C ffmpeg-static --strip-components=1 --wildcards \"*/ffmpeg\" && \\\n+    mv /ffmpeg-static/ffmpeg /usr/bin/ffmpeg\n+\n+WORKDIR /src\n+COPY Cargo.toml Cargo.lock /src/\n+# To cache this step, we only copy the toml file above\n+RUN cargo fetch\n+\n+COPY . /src\n+\n+RUN cargo build --release ${FEATURES} && \\\n+    cargo test --release ${FEATURES}\n \n+FROM node:8-alpine as frontend\n \n-RUN export PATH=${HOME}/.cargo/bin:$PATH &&\\\n-    cd audioserve_src &&\\\n-    cargo build --release ${FEATURES} &&\\\n-    cargo test --release ${FEATURES}\n+WORKDIR /src\n+COPY client /src\n \n-RUN cd audioserve_src/client &&\\\n-    npm install &&\\\n+RUN npm install && \\\n     npm run build\n \n-RUN mkdir /ssl &&\\\n-    cd /ssl &&\\\n-    openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem \\\n-        -subj \"/C=CZ/ST=Prague/L=Prague/O=Ivan/CN=audioserve\" &&\\\n-    openssl pkcs12 -inkey key.pem -in certificate.pem -export  -passout pass:mypass -out audioserve.p12 \n-","path":"Dockerfile","position":63,"original_position":63,"commit_id":"709f9949ce6a5025135e16162087fac99c815e4e","original_commit_id":"709f9949ce6a5025135e16162087fac99c815e4e","user":{"login":"izderadicka","id":2185733,"node_id":"MDQ6VXNlcjIxODU3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2185733?v=4","gravatar_id":"","url":"https://api.github.com/users/izderadicka","html_url":"https://github.com/izderadicka","followers_url":"https://api.github.com/users/izderadicka/followers","following_url":"https://api.github.com/users/izderadicka/following{/other_user}","gists_url":"https://api.github.com/users/izderadicka/gists{/gist_id}","starred_url":"https://api.github.com/users/izderadicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izderadicka/subscriptions","organizations_url":"https://api.github.com/users/izderadicka/orgs","repos_url":"https://api.github.com/users/izderadicka/repos","events_url":"https://api.github.com/users/izderadicka/events{/privacy}","received_events_url":"https://api.github.com/users/izderadicka/received_events","type":"User","site_admin":false},"body":"Then we also need openssl binary in final image.  I'd keep it in image but did not use it by default - let default be just plain HTTP as majority of user will use rev. proxy I think - just have an option to use bundled key for local TLS tests.","created_at":"2019-01-03T09:20:09Z","updated_at":"2019-01-03T09:20:09Z","html_url":"https://github.com/izderadicka/audioserve/pull/5#discussion_r244942002","pull_request_url":"https://api.github.com/repos/izderadicka/audioserve/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/comments/244942002"},"html":{"href":"https://github.com/izderadicka/audioserve/pull/5#discussion_r244942002"},"pull_request":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/5"}},"in_reply_to_id":244937940},"pull_request":{"url":"https://api.github.com/repos/izderadicka/audioserve/pulls/5","id":241649415,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNjQ5NDE1","html_url":"https://github.com/izderadicka/audioserve/pull/5","diff_url":"https://github.com/izderadicka/audioserve/pull/5.diff","patch_url":"https://github.com/izderadicka/audioserve/pull/5.patch","issue_url":"https://api.github.com/repos/izderadicka/audioserve/issues/5","number":5,"state":"open","locked":false,"title":"Leaner Docker Image","user":{"login":"captn3m0","id":584253,"node_id":"MDQ6VXNlcjU4NDI1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/584253?v=4","gravatar_id":"","url":"https://api.github.com/users/captn3m0","html_url":"https://github.com/captn3m0","followers_url":"https://api.github.com/users/captn3m0/followers","following_url":"https://api.github.com/users/captn3m0/following{/other_user}","gists_url":"https://api.github.com/users/captn3m0/gists{/gist_id}","starred_url":"https://api.github.com/users/captn3m0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captn3m0/subscriptions","organizations_url":"https://api.github.com/users/captn3m0/orgs","repos_url":"https://api.github.com/users/captn3m0/repos","events_url":"https://api.github.com/users/captn3m0/events{/privacy}","received_events_url":"https://api.github.com/users/captn3m0/received_events","type":"User","site_admin":false},"body":"Still a WIP. Planning to switch this to a 2-stage docker build, similar to what https://github.com/fornwall/rust-static-builder/ suggests.\r\n\r\n_Need help with converting this to a completely static binary._\r\n\r\nIdeally, the ssl certs should not be built into the image. With Docker based setups, either of these two is the norm:\r\n\r\n1. TLS termination is handled by another service, which proxies over HTTP. You can use something like https://gilyes.com/docker-nginx-letsencrypt/ to proxy across.\r\n2. Terminate TLS, but instead of using insecure certificate, rely on a volume mount for administrators to mount the SSL key and certificate.\r\n","created_at":"2019-01-01T20:22:13Z","updated_at":"2019-01-03T09:20:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c1df702c86fda22e0719102b3526c17384c10e9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/izderadicka/audioserve/pulls/5/commits","review_comments_url":"https://api.github.com/repos/izderadicka/audioserve/pulls/5/comments","review_comment_url":"https://api.github.com/repos/izderadicka/audioserve/pulls/comments{/number}","comments_url":"https://api.github.com/repos/izderadicka/audioserve/issues/5/comments","statuses_url":"https://api.github.com/repos/izderadicka/audioserve/statuses/709f9949ce6a5025135e16162087fac99c815e4e","head":{"label":"captn3m0:docker-cleaner","ref":"docker-cleaner","sha":"709f9949ce6a5025135e16162087fac99c815e4e","user":{"login":"captn3m0","id":584253,"node_id":"MDQ6VXNlcjU4NDI1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/584253?v=4","gravatar_id":"","url":"https://api.github.com/users/captn3m0","html_url":"https://github.com/captn3m0","followers_url":"https://api.github.com/users/captn3m0/followers","following_url":"https://api.github.com/users/captn3m0/following{/other_user}","gists_url":"https://api.github.com/users/captn3m0/gists{/gist_id}","starred_url":"https://api.github.com/users/captn3m0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captn3m0/subscriptions","organizations_url":"https://api.github.com/users/captn3m0/orgs","repos_url":"https://api.github.com/users/captn3m0/repos","events_url":"https://api.github.com/users/captn3m0/events{/privacy}","received_events_url":"https://api.github.com/users/captn3m0/received_events","type":"User","site_admin":false},"repo":{"id":163762295,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM3NjIyOTU=","name":"audioserve","full_name":"captn3m0/audioserve","private":false,"owner":{"login":"captn3m0","id":584253,"node_id":"MDQ6VXNlcjU4NDI1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/584253?v=4","gravatar_id":"","url":"https://api.github.com/users/captn3m0","html_url":"https://github.com/captn3m0","followers_url":"https://api.github.com/users/captn3m0/followers","following_url":"https://api.github.com/users/captn3m0/following{/other_user}","gists_url":"https://api.github.com/users/captn3m0/gists{/gist_id}","starred_url":"https://api.github.com/users/captn3m0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/captn3m0/subscriptions","organizations_url":"https://api.github.com/users/captn3m0/orgs","repos_url":"https://api.github.com/users/captn3m0/repos","events_url":"https://api.github.com/users/captn3m0/events{/privacy}","received_events_url":"https://api.github.com/users/captn3m0/received_events","type":"User","site_admin":false},"html_url":"https://github.com/captn3m0/audioserve","description":"Simple personal server to serve audiofiles files from folders.  Intended primarily for audio books, but anything with decent folder structure will do.","fork":true,"url":"https://api.github.com/repos/captn3m0/audioserve","forks_url":"https://api.github.com/repos/captn3m0/audioserve/forks","keys_url":"https://api.github.com/repos/captn3m0/audioserve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/captn3m0/audioserve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/captn3m0/audioserve/teams","hooks_url":"https://api.github.com/repos/captn3m0/audioserve/hooks","issue_events_url":"https://api.github.com/repos/captn3m0/audioserve/issues/events{/number}","events_url":"https://api.github.com/repos/captn3m0/audioserve/events","assignees_url":"https://api.github.com/repos/captn3m0/audioserve/assignees{/user}","branches_url":"https://api.github.com/repos/captn3m0/audioserve/branches{/branch}","tags_url":"https://api.github.com/repos/captn3m0/audioserve/tags","blobs_url":"https://api.github.com/repos/captn3m0/audioserve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/captn3m0/audioserve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/captn3m0/audioserve/git/refs{/sha}","trees_url":"https://api.github.com/repos/captn3m0/audioserve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/captn3m0/audioserve/statuses/{sha}","languages_url":"https://api.github.com/repos/captn3m0/audioserve/languages","stargazers_url":"https://api.github.com/repos/captn3m0/audioserve/stargazers","contributors_url":"https://api.github.com/repos/captn3m0/audioserve/contributors","subscribers_url":"https://api.github.com/repos/captn3m0/audioserve/subscribers","subscription_url":"https://api.github.com/repos/captn3m0/audioserve/subscription","commits_url":"https://api.github.com/repos/captn3m0/audioserve/commits{/sha}","git_commits_url":"https://api.github.com/repos/captn3m0/audioserve/git/commits{/sha}","comments_url":"https://api.github.com/repos/captn3m0/audioserve/comments{/number}","issue_comment_url":"https://api.github.com/repos/captn3m0/audioserve/issues/comments{/number}","contents_url":"https://api.github.com/repos/captn3m0/audioserve/contents/{+path}","compare_url":"https://api.github.com/repos/captn3m0/audioserve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/captn3m0/audioserve/merges","archive_url":"https://api.github.com/repos/captn3m0/audioserve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/captn3m0/audioserve/downloads","issues_url":"https://api.github.com/repos/captn3m0/audioserve/issues{/number}","pulls_url":"https://api.github.com/repos/captn3m0/audioserve/pulls{/number}","milestones_url":"https://api.github.com/repos/captn3m0/audioserve/milestones{/number}","notifications_url":"https://api.github.com/repos/captn3m0/audioserve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/captn3m0/audioserve/labels{/name}","releases_url":"https://api.github.com/repos/captn3m0/audioserve/releases{/id}","deployments_url":"https://api.github.com/repos/captn3m0/audioserve/deployments","created_at":"2019-01-01T19:50:14Z","updated_at":"2019-01-01T19:50:16Z","pushed_at":"2019-01-03T07:05:11Z","git_url":"git://github.com/captn3m0/audioserve.git","ssh_url":"git@github.com:captn3m0/audioserve.git","clone_url":"https://github.com/captn3m0/audioserve.git","svn_url":"https://github.com/captn3m0/audioserve","homepage":null,"size":324,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"izderadicka:master","ref":"master","sha":"39d5228b7fb5998bcad58f63788b979c2f6c5fcf","user":{"login":"izderadicka","id":2185733,"node_id":"MDQ6VXNlcjIxODU3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2185733?v=4","gravatar_id":"","url":"https://api.github.com/users/izderadicka","html_url":"https://github.com/izderadicka","followers_url":"https://api.github.com/users/izderadicka/followers","following_url":"https://api.github.com/users/izderadicka/following{/other_user}","gists_url":"https://api.github.com/users/izderadicka/gists{/gist_id}","starred_url":"https://api.github.com/users/izderadicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izderadicka/subscriptions","organizations_url":"https://api.github.com/users/izderadicka/orgs","repos_url":"https://api.github.com/users/izderadicka/repos","events_url":"https://api.github.com/users/izderadicka/events{/privacy}","received_events_url":"https://api.github.com/users/izderadicka/received_events","type":"User","site_admin":false},"repo":{"id":116424493,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY0MjQ0OTM=","name":"audioserve","full_name":"izderadicka/audioserve","private":false,"owner":{"login":"izderadicka","id":2185733,"node_id":"MDQ6VXNlcjIxODU3MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2185733?v=4","gravatar_id":"","url":"https://api.github.com/users/izderadicka","html_url":"https://github.com/izderadicka","followers_url":"https://api.github.com/users/izderadicka/followers","following_url":"https://api.github.com/users/izderadicka/following{/other_user}","gists_url":"https://api.github.com/users/izderadicka/gists{/gist_id}","starred_url":"https://api.github.com/users/izderadicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izderadicka/subscriptions","organizations_url":"https://api.github.com/users/izderadicka/orgs","repos_url":"https://api.github.com/users/izderadicka/repos","events_url":"https://api.github.com/users/izderadicka/events{/privacy}","received_events_url":"https://api.github.com/users/izderadicka/received_events","type":"User","site_admin":false},"html_url":"https://github.com/izderadicka/audioserve","description":"Simple personal server to serve audiofiles files from folders.  Intended primarily for audio books, but anything with decent folder structure will do.","fork":false,"url":"https://api.github.com/repos/izderadicka/audioserve","forks_url":"https://api.github.com/repos/izderadicka/audioserve/forks","keys_url":"https://api.github.com/repos/izderadicka/audioserve/keys{/key_id}","collaborators_url":"https://api.github.com/repos/izderadicka/audioserve/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/izderadicka/audioserve/teams","hooks_url":"https://api.github.com/repos/izderadicka/audioserve/hooks","issue_events_url":"https://api.github.com/repos/izderadicka/audioserve/issues/events{/number}","events_url":"https://api.github.com/repos/izderadicka/audioserve/events","assignees_url":"https://api.github.com/repos/izderadicka/audioserve/assignees{/user}","branches_url":"https://api.github.com/repos/izderadicka/audioserve/branches{/branch}","tags_url":"https://api.github.com/repos/izderadicka/audioserve/tags","blobs_url":"https://api.github.com/repos/izderadicka/audioserve/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/izderadicka/audioserve/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/izderadicka/audioserve/git/refs{/sha}","trees_url":"https://api.github.com/repos/izderadicka/audioserve/git/trees{/sha}","statuses_url":"https://api.github.com/repos/izderadicka/audioserve/statuses/{sha}","languages_url":"https://api.github.com/repos/izderadicka/audioserve/languages","stargazers_url":"https://api.github.com/repos/izderadicka/audioserve/stargazers","contributors_url":"https://api.github.com/repos/izderadicka/audioserve/contributors","subscribers_url":"https://api.github.com/repos/izderadicka/audioserve/subscribers","subscription_url":"https://api.github.com/repos/izderadicka/audioserve/subscription","commits_url":"https://api.github.com/repos/izderadicka/audioserve/commits{/sha}","git_commits_url":"https://api.github.com/repos/izderadicka/audioserve/git/commits{/sha}","comments_url":"https://api.github.com/repos/izderadicka/audioserve/comments{/number}","issue_comment_url":"https://api.github.com/repos/izderadicka/audioserve/issues/comments{/number}","contents_url":"https://api.github.com/repos/izderadicka/audioserve/contents/{+path}","compare_url":"https://api.github.com/repos/izderadicka/audioserve/compare/{base}...{head}","merges_url":"https://api.github.com/repos/izderadicka/audioserve/merges","archive_url":"https://api.github.com/repos/izderadicka/audioserve/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/izderadicka/audioserve/downloads","issues_url":"https://api.github.com/repos/izderadicka/audioserve/issues{/number}","pulls_url":"https://api.github.com/repos/izderadicka/audioserve/pulls{/number}","milestones_url":"https://api.github.com/repos/izderadicka/audioserve/milestones{/number}","notifications_url":"https://api.github.com/repos/izderadicka/audioserve/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/izderadicka/audioserve/labels{/name}","releases_url":"https://api.github.com/repos/izderadicka/audioserve/releases{/id}","deployments_url":"https://api.github.com/repos/izderadicka/audioserve/deployments","created_at":"2018-01-05T20:35:18Z","updated_at":"2019-01-02T19:59:05Z","pushed_at":"2019-01-03T07:05:13Z","git_url":"git://github.com/izderadicka/audioserve.git","ssh_url":"git@github.com:izderadicka/audioserve.git","clone_url":"https://github.com/izderadicka/audioserve.git","svn_url":"https://github.com/izderadicka/audioserve","homepage":null,"size":315,"stargazers_count":20,"watchers_count":20,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":2,"open_issues":4,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/5"},"html":{"href":"https://github.com/izderadicka/audioserve/pull/5"},"issue":{"href":"https://api.github.com/repos/izderadicka/audioserve/issues/5"},"comments":{"href":"https://api.github.com/repos/izderadicka/audioserve/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/izderadicka/audioserve/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/izderadicka/audioserve/statuses/709f9949ce6a5025135e16162087fac99c815e4e"}},"author_association":"NONE"}}
{"actor":{"display_login":"izderadicka"}}