@@ -19,15 +19,22 @@ Patchwork provides a Docker-based environment for quick configuration of a
1919development environment. This is the preferred installation method. To
2020configure Patchwork using Docker:
2121
22- 1 . Install `docker `_ and `docker-compose `_.
22+ # . Install `docker `_ and `docker-compose `_.
2323
24- 2. Build the images. This will download over 200MB from the internet:
24+ #. Create a ``.env `` file in the root directory of the project and store your
25+ ``UID `` attribute there.
26+
27+ .. code-block :: shell
28+
29+ $ echo " UID=$UID " > .env
30+
31+ #. Build the images. This will download over 200MB from the internet:
2532
2633 .. code-block :: shell
2734
2835 $ docker-compose build
2936
30- 3 . Run `docker-compose up `:
37+ # . Run `` docker-compose up ` `:
3138
3239 .. code-block :: shell
3340
@@ -118,38 +125,18 @@ For more information on Docker itself, please refer to the `docker`_ and
118125
119126 If you see an error like the below::
120127
121- py.error.EACCES: [Permission denied]: open('/home/patchwork/patchwork/.tox/py27-django18/.tox-config1', 'w')
122-
123- your host user account is likely using a different UID to the one hardcoded
124- in the Dockerfile. You can confirm this like so:
128+ You must define UID in .env
125129
126- .. code-block :: shell
127-
128- $ echo $UID
129- 1234
130-
131- If this is anything other than `1000 `, you must must modify the `Dockerfile `
132- found in `tools/docker ` to use your UID and then rebuild:
133-
134- .. code-block :: shell
130+ Ensure you have created a ``.env `` file in the root of your project
131+ directory and stored the ``UID `` attribute there. For more information on
132+ why this is necessary, refer to this `docker-compose issue `__.
135133
136- $ sed -i " /ARG UID=/c\ARG UID=$( echo $UID ) " tools/docker/Dockerfile
137- $ docker-compose build web
138-
139- This change must be retained in the event that you rebuild the container.
140- You can "hide" the change from Git like so:
141-
142- .. code-block :: shell
143-
144- $ git update-index --assume-unchanged tools/docker/Dockerfile
145- $ git update-index --skip-worktree tools/docker/Dockerfile
146-
147- This should be resolved in a future release when we support docker-compose
148- 2.1 syntax in `docker-compose.yml `.
134+ __ https://github.com/docker/compose/issues/2380
149135
150136.. _docker : https://docs.docker.com/compose/install/
151137.. _docker-compose : https://docs.docker.com/engine/installation/linux/
152138
139+
153140Manual Installation
154141-------------------
155142
@@ -375,6 +362,7 @@ using the aptly-named `createsuperuser` command:
375362
376363 (.venv)$ ./manage.py createsuperuser
377364
365+
378366Import Mailing List Archives
379367----------------------------
380368
@@ -429,6 +417,7 @@ script again.
429417
430418__ http://blog.behnel.de/posts/indexp118.html
431419
420+
432421Django Debug Toolbar
433422--------------------
434423
@@ -437,6 +426,7 @@ by default this is only displayed if you are developing on localhost. If
437426developing on a different machine, you should configure an SSH tunnel such
438427that, for example, ` localhost:8000` points to ` [DEV_MACHINE_IP]:8000` .
439428
429+
440430.. _dev-envvar:
441431
442432Environment Variables
0 commit comments