More explanations

- Legacy-Id: 19419
This commit is contained in:
Lars Eggert 2021-10-13 14:21:42 +00:00
parent c4ba1ea75f
commit d746348ea6

View file

@ -1,5 +1,7 @@
# Datatracker Development in Docker # Datatracker Development in Docker
## Getting started
1. [Set up Docker](https://docs.docker.com/get-started/) on your preferred 1. [Set up Docker](https://docs.docker.com/get-started/) on your preferred
platform. platform.
@ -12,11 +14,13 @@
svn co https://svn.ietf.org/svn/tools/ietfdb/trunk svn co https://svn.ietf.org/svn/tools/ietfdb/trunk
cd trunk cd trunk
3. **TEMPORARY:** Replace the contents of the `docker` directory with Lars' 3. **TEMPORARY:** Replace the contents of the `docker` directory with [Lars'
files. files](https://svn.ietf.org/svn/tools/ietfdb/personal/lars/7.39.1.dev0/docker/).
4. **TEMPORARY:** Until Lars' changes have been merged and a docker image is 4. **TEMPORARY:** Until [Lars'
available for download, you will need to build it locally: changes](https://svn.ietf.org/svn/tools/ietfdb/personal/lars/7.39.1.dev0/docker/)
have been merged and a docker image is available for download, you will need
to build it locally:
docker/build docker/build
@ -24,14 +28,29 @@
5. Use the `docker/run` script to start the datatracker container. You will be 5. Use the `docker/run` script to start the datatracker container. You will be
dropped into a shell from which you can start the datatracker and execute dropped into a shell from which you can start the datatracker and execute
related commands as usual, for example: related commands as usual, for example
ietf/manage.py runserver 0.0.0.0:8000 ietf/manage.py runserver 0.0.0.0:8000
to start the datatracker.
You can also pass additional arguments to `docker/run`, in which case they
will be executed in the container (instead of a shell being started.)
If you do not already have a copy of the IETF database available in the If you do not already have a copy of the IETF database available in the
`data` directory, one will be downloaded and imported the first time you run `data` directory, one will be downloaded and imported the first time you run
`docker/run`. This will take some time. `docker/run`. This will take some time.
Once the datatracker has started, you should be able to open Once the datatracker has started, you should be able to open
[http://localhost:8000](http://localhost:8000) in a browser and see the [http://localhost:8000](http://localhost:8000) in a browser and see the
landing page. landing page.
## Troubleshooting
- If the database fails to start, the cause is usually an incompatibility
between the database that last touched the files in `data/mysql` and the
database running inside the docker container.
The solution is to blow away your existing database (`rm -rf data/mysql`). A
fresh copy will be retrieved and imported next time you do `docker/run`, which
should resolve this issue.