Project

General

Profile

Running with Docker » History » Version 14

Luke Murphey, 01/01/2020 06:01 PM

1 1 Luke Murphey
h1. Running with Docker
2 1 Luke Murphey
3 2 Luke Murphey
h2. Prerequisites
4 1 Luke Murphey
5 2 Luke Murphey
You will need to have Docker installed. See https://docs.docker.com/install/.
6 2 Luke Murphey
7 2 Luke Murphey
You will also need a copy of the works database (library.sqlite).
8 2 Luke Murphey
9 2 Luke Murphey
h2. Getting the TextCritical Docker image running
10 2 Luke Murphey
11 12 Luke Murphey
h3. Step 1: Get the textcritical image from Docker Hub
12 1 Luke Murphey
13 12 Luke Murphey
<pre>
14 12 Luke Murphey
docker pull lukemurphey/textcritical
15 12 Luke Murphey
</pre>
16 1 Luke Murphey
17 12 Luke Murphey
h3. Step 2: Create the necessary directories on the host file-system
18 1 Luke Murphey
19 12 Luke Murphey
You will need to create a series of directories on your host file-system to store content. To do so create a directory such as "textcritical" and create a directory within it named "db".
20 1 Luke Murphey
21 12 Luke Murphey
h3. Step 3: Place your database files in "db"
22 2 Luke Murphey
23 12 Luke Murphey
Put library.sqlite under the "db" directory. You can use "the library of works attached":https://lukemurphey.net/attachments/download/461/library.sqlite to this wiki entry to get started quickly (although it only includes one work).
24 2 Luke Murphey
25 12 Luke Murphey
* db/library.sqlite
26 12 Luke Murphey
* db/textcritical.sqlite
27 2 Luke Murphey
28 12 Luke Murphey
h3. Step 4: Run the container
29 2 Luke Murphey
30 2 Luke Murphey
<pre>
31 13 Luke Murphey
docker run --restart always -d -p 8080:8080/tcp -v /opt/textcritical/db:/db lukemurphey/textcritical
32 2 Luke Murphey
</pre>
33 2 Luke Murphey
34 9 Luke Murphey
You should now be able to access TextCritical on port 8080 on your localhost (e.g. http://localhost:8080).
35 8 Luke Murphey
36 14 Luke Murphey
The instance is setup with a default login name of "admin" and a password of "changeme". You can log into the administration system at the URL "admin" (e.g. http://localhost:8080/admin/).
37 14 Luke Murphey
38 14 Luke Murphey
The container has several paths you may want to override:
39 14 Luke Murphey
40 14 Luke Murphey
| *Path*                     | *Description*                                                    | *Notes*                                                                            |
41 14 Luke Murphey
| /db                      | The location of the databases                                  |                                                                                  |
42 14 Luke Murphey
| /usr/src/app/media/files | The location where generated files will be stored (for eBooks) | This will be populated when a user requests an ebook                             |
43 14 Luke Murphey
| /usr/src/app/var/indexes | Where the search indexes will be stored                        |                                                                                  |
44 14 Luke Murphey
| /usr/src/app/var/cache   | The file-system based cache                                    | This cache is used to improve web-server response time                           |
45 14 Luke Murphey
| /static                  | A copy of the static resources                                 | Define this path if you want to have another web-server serve the static content |