Project

General

Profile

Running with Docker » History » Version 12

Version 11 (Luke Murphey, 12/26/2019 05:45 AM) → Version 12/14 (Luke Murphey, 01/01/2020 05:02 AM)

h1. Running with Docker

h2. Prerequisites

You will need to have Docker installed. See https://docs.docker.com/install/.

You will also need a copy of the works database (library.sqlite).

h2. Getting the TextCritical Docker image running

h3. Step 1: Get Download TextCritical code

Download a zip file of
the textcritical image project from Docker Hub https://github.com/LukeMurphey/textcritical_net. You can do this by the "Clone or download" button and selecting "Download ZIP".

!download_zip.png!


<pre>
docker pull lukemurphey/textcritical
</pre>
Unzip the downloaded file into a directory.

h3. Step 2: Create Put a copy of the necessary directories on database in the host file-system var directory of the source-code

You will need to create Obtain a series copy of directories on your host file-system to store content. To do so create a directory such as "textcritical" the library of works (library.sqlite) and create a directory within place it named "db".

h3. Step 3: Place your database files
in "db"

Put library.sqlite under
the "db" directory. /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 one work).

* db/library.sqlite h3. Step 3: Build the docker image

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":

<pre>

* db/textcritical.sqlite

docker build -t textcritical .
</pre>

h3. Step 4: Run Start the container docker image

Start the docker image with the following command:

<pre>
docker run --restart always -d -p 8080:8080/tcp -v $DB_DIR:/db lukemurphey/textcritical 8080:8080 textcritical
</pre>

You should now be able to access TextCritical on port 8080 on your localhost (e.g. http://localhost:8080).

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/)