{"action":"created","issue":{"url":"https://api.github.com/repos/mirumee/saleor/issues/3091","repository_url":"https://api.github.com/repos/mirumee/saleor","labels_url":"https://api.github.com/repos/mirumee/saleor/issues/3091/labels{/name}","comments_url":"https://api.github.com/repos/mirumee/saleor/issues/3091/comments","events_url":"https://api.github.com/repos/mirumee/saleor/issues/3091/events","html_url":"https://github.com/mirumee/saleor/pull/3091","id":368720529,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxODMyNzg2","number":3091,"title":"Remove host mounted volume in docker-compose","user":{"login":"tiangolo","id":1326112,"node_id":"MDQ6VXNlcjEzMjYxMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1326112?v=4","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-10T15:22:32Z","updated_at":"2018-10-12T10:16:07Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mirumee/saleor/pulls/3091","html_url":"https://github.com/mirumee/saleor/pull/3091","diff_url":"https://github.com/mirumee/saleor/pull/3091.diff","patch_url":"https://github.com/mirumee/saleor/pull/3091.patch"},"body":"Remove host mounted volume in docker-compose as the app expects files created at build time that doesn't exist in the mounted source files.\r\n\r\nEven though I like the development trick of mounting the source code during development to be able to \"hot reload\" instead of having to build the image from scratch again, it doesn't work in this case, because it expects some files and directories to exists.\r\n\r\nIt expects:\r\n\r\n* a directory `/app/static` , [created at build time](https://github.com/mirumee/saleor/blob/master/Dockerfile#L64)\r\n* a directory `/app/media`, [created at build time](https://github.com/mirumee/saleor/blob/master/Dockerfile#L64)\r\n\r\nAs I wanted to develop locally with the mounted app directory, I tried creating them by hand, but the files are created and owned by my own Linux user, with `uid` `1000`, and the Linux user created inside the container is a new user (`saleor`), and as it is created as a system user, it has `uid` `999`, so it cannot create anything inside those directories.\r\n\r\nI tried [commenting out the lines to create a custom user inside the container instead of the default `root` user](https://github.com/mirumee/saleor/blob/master/Dockerfile#L63).\r\n\r\nBut then I discovered that it also expects:\r\n\r\n* A file `/app/webpack-bundle.json` [copied from the previous Docker build stage, created at build time](https://github.com/mirumee/saleor/blob/master/Dockerfile#L54)\r\n\r\n...and probably some other files in subsequent steps.\r\n\r\n## I want to merge this change because...\r\n\r\nWith the current layout of the source files and architecture, it's not feasible to mount the local app directory for development. If it is wanted / required, while a new layout is defined, this would simplify testing Saleor locally with Docker.\r\n\r\n<!-- Please mention all relevant issue numbers. -->\r\n\r\n## Relevant issues\r\n\r\nDirectly causes: #3049\r\nI can't say that it causes #2642 , but after adding the directories manually, it causes the problems described in these subsequent comments: https://github.com/mirumee/saleor/issues/2642#issuecomment-414584455 https://github.com/mirumee/saleor/issues/2642#issuecomment-419433915 \r\nhttps://github.com/mirumee/saleor/issues/2642#issuecomment-427600603\r\n\r\nThen, after adding the directories manually and removing the custom user or having any other workaround, it causes: #2506\r\n\r\n### Pull Request Checklist\r\n\r\n<!-- Please keep this section. It will make maintainer's life easier. -->\r\n\r\n1. [n/a] Privileged views and APIs are guarded by proper permission checks.\r\n1. [n/a] All visible strings are translated with proper context.\r\n1. [n/a] All data-formatting is locale-aware (dates, numbers, and so on).\r\n1. [n/a] Database queries are optimized and the number of queries is constant.\r\n1. [x] The changes are tested.\r\n1. [n/a] The code is documented (docstrings, project documentation).\r\n1. [n/a] GraphQL schema and type definitions are up to date.\r\n"},"comment":{"url":"https://api.github.com/repos/mirumee/saleor/issues/comments/429277618","html_url":"https://github.com/mirumee/saleor/pull/3091#issuecomment-429277618","issue_url":"https://api.github.com/repos/mirumee/saleor/issues/3091","id":429277618,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTI3NzYxOA==","user":{"login":"tiangolo","id":1326112,"node_id":"MDQ6VXNlcjEzMjYxMTI=","avatar_url":"https://avatars0.githubusercontent.com/u/1326112?v=4","gravatar_id":"","url":"https://api.github.com/users/tiangolo","html_url":"https://github.com/tiangolo","followers_url":"https://api.github.com/users/tiangolo/followers","following_url":"https://api.github.com/users/tiangolo/following{/other_user}","gists_url":"https://api.github.com/users/tiangolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tiangolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiangolo/subscriptions","organizations_url":"https://api.github.com/users/tiangolo/orgs","repos_url":"https://api.github.com/users/tiangolo/repos","events_url":"https://api.github.com/users/tiangolo/events{/privacy}","received_events_url":"https://api.github.com/users/tiangolo/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T10:16:07Z","updated_at":"2018-10-12T10:16:07Z","author_association":"NONE","body":"Good point @ajostergaard :+1: . \r\n\r\nI just updated it."}}
{"actor":{"display_login":"tiangolo"}}