Running with Docker » History » Version 9
Version 8 (Luke Murphey, 06/03/2019 09:11 PM) → Version 9/14 (Luke Murphey, 06/03/2019 09:49 PM)
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. Download TextCritical code
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".
!download_zip.png!
Unzip the downloaded file into a directory.
h3. Put a copy of the database in the var directory of the source-code
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).
h3. 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>
docker build -t textcritical .
</pre>
h3. Start the docker image
Start the docker image with the following command:
<pre>
docker run -p 8080:8080 textcritical
</pre>
You should now be able to access TextCritical on port 8080 on your localhost (e.g. http://localhost:8080). (http://localhost:8080).
h3. Set the superuser login
The instance is setup Connect to the running Docker image shell. Then initialize the database:
<pre>
python manage.py migrate
</pre>
Next: create a super user 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/) following command:
<pre>
python manage.py createsuperuser
</pre>
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. Download TextCritical code
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".
!download_zip.png!
Unzip the downloaded file into a directory.
h3. Put a copy of the database in the var directory of the source-code
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).
h3. 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>
docker build -t textcritical .
</pre>
h3. Start the docker image
Start the docker image with the following command:
<pre>
docker run -p 8080:8080 textcritical
</pre>
You should now be able to access TextCritical on port 8080 on your localhost (e.g. http://localhost:8080). (http://localhost:8080).
h3. Set the superuser login
The instance is setup Connect to the running Docker image shell. Then initialize the database:
<pre>
python manage.py migrate
</pre>
Next: create a super user 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/) following command:
<pre>
python manage.py createsuperuser
</pre>