Skip to content

Commit 89b2d1b

Browse files
committed
Added detail on how to run and build the docker image to the README
1 parent dd2e0ee commit 89b2d1b

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

README.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,51 @@ Here is the [link to FreeTxt app](https://www.freetxt.app/) which is currently u
88

99
- For further information on the FreeTxt project please contact the project team: CorCenCC@Cardiff.ac.uk
1010

11+
# Building with Docker/Podman (as a User)
1112

12-
# FreeTxt-Flask Setup Instructions
13+
[![Create and publish a Docker image](https://github.com/UCREL/FreeTxt-Flask/actions/workflows/publish.yml/badge.svg)](https://github.com/UCREL/FreeTxt-Flask/actions/workflows/publish.yml)
1314

14-
Follow these steps to set up the project on your local machine.
15+
This is the recommended way to build FreeTxt2 for normal usage. If you need to develop with FreeTxt please see the following section(s) after this one.
16+
17+
## Step 1: Install Docker Desktop or Podman Desktop
18+
Pick **one** of the following products (either will work!) and follow their setup instructions as detailed on one of these links:
19+
20+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
21+
- [Podman Desktop](https://podman-desktop.io/)
22+
23+
## Step 2: Run the `ghcr.io/ucrel/freetxt-flask:main` image
24+
25+
Open a console or terminal, and run:
26+
27+
`docker run -p 8000:8000 --rm ghcr.io/ucrel/freetxt-flask:main`
28+
29+
for Docker Desktop or:
30+
31+
`podman run -p 8000:8000 --rm ghcr.io/ucrel/freetxt-flask:main`
32+
33+
for Podman Desktop.
34+
35+
After the image has downloaded and the container started up, you should be able to visit [http://localhost:8000/](http://localhost:8000/) to access FreeTxt2.
36+
37+
The cache folder and working directory are available on the `/cache` and `/var/freetxt` paths respectively, and can be mounted to your host if required through bind mounts or volume mounts.
38+
39+
If you plan to run FreeTxt2 for very long periods of time, you may want to mount `/cache` as this will include any uploaded text for processing, so can become quite large over time. Bind mounting this will let you periodically clear the folder without restarting the container.
40+
41+
## Building a local docker image (as a Developer)
42+
43+
To build a local image (for development) simply clone this repository, then from the root directory of the clone run:
44+
45+
`docker build -t freetxt-local .`
46+
47+
or:
48+
49+
`podman build -t freetxt-local .`
50+
51+
(Note the `.` at the end is important!)
52+
53+
# FreeTxt-Flask Setup Instructions (as a Developer)
54+
55+
Follow these steps to set up the project on your local machine _without_ a container runtime.
1556

1657
## Prerequisites
1758

0 commit comments

Comments
 (0)