Project

General

Profile

Running with Docker » History » Version 7

Luke Murphey, 06/03/2019 09:04 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 2 Luke Murphey
h3. Download TextCritical code
12 4 Luke Murphey
13 7 Luke Murphey
Download a zip file of the project from https://github.com/LukeMurphey/textcritical_net. You can do this by the "Clone or download" button and selecting "Download ZIP". 
14 2 Luke Murphey
15 2 Luke Murphey
!download_zip.png!
16 2 Luke Murphey
17 2 Luke Murphey
Unzip the downloaded file into a directory.
18 2 Luke Murphey
19 2 Luke Murphey
h3. Put a copy of the database in the var directory of the source-code
20 2 Luke Murphey
21 6 Luke Murphey
Obtain a copy of the library of works (library.sqlite) and place it in the /var directory of the source-code (i.e. textcritical_net-master/var/library.sqlite). 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 on work).
22 2 Luke Murphey
23 2 Luke Murphey
h3. Build the docker image
24 2 Luke Murphey
25 2 Luke Murphey
Run the following from the directory where you unzipped the source code. This needs to be the same directory with the file with the name "Dockerfile":
26 2 Luke Murphey
27 2 Luke Murphey
<pre>
28 2 Luke Murphey
docker build -t textcritical .
29 2 Luke Murphey
</pre>
30 2 Luke Murphey
31 2 Luke Murphey
32 2 Luke Murphey
h3. Start the docker image
33 2 Luke Murphey
34 2 Luke Murphey
Start the docker image with the following command:
35 2 Luke Murphey
36 2 Luke Murphey
<pre>
37 2 Luke Murphey
docker run -p 8080:8080 textcritical
38 2 Luke Murphey
</pre>
39 2 Luke Murphey
40 2 Luke Murphey
You should now be able to access TextCritical on port 8080 on your localhost (http://localhost:8080).