Skip to content

Commit

Permalink
Merge pull request #1655 from wger-project/clarify-where-to-get-image…
Browse files Browse the repository at this point in the history
…-before-trying-to-run

put building/obtaining image instructions before trying to run it.
  • Loading branch information
rolandgeider committed May 18, 2024
2 parents ef335dc + 875fe4b commit dd9c9f8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Developers
* Alexandra Rhodes - https://github.com/arhodes130
* Jayanth Bontha - https://github.com/JayanthBontha
* Ethan Winters - https://github.com/ebwinters
* Dieter Plaetinck - https://github.com/Dieterbe

Translators
-----------
Expand Down
2 changes: 1 addition & 1 deletion extras/docker/development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN apt update \

# Build the necessary python wheels
# Note that the --mount tmpfs is a workaround for https://github.com/rust-lang/cargo/issues/8719
COPY requirements* .
COPY requirements* ./
RUN --mount=type=tmpfs,target=/root/.cargo \
pip3 wheel --no-cache-dir --wheel-dir /wheels -r requirements_docker.txt

Expand Down
29 changes: 19 additions & 10 deletions extras/docker/development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,23 @@ it is self-contained).

A more comfortable development version is provided in the compose folder.

### 1 - Start the container
### 1 - Installing docker

Install docker, and the docker buildx tool (if they are separate packages on your system, e.g. on Arch Linux)

### 2 - Obtaining/building the docker image

We will run the `wger/server:latest` image in the next step.

You can either download it from [dockerhub](https://hub.docker.com/r/wger/server); docker will do this automatically if you have no such image with that tag yet.
You can also run `docker pull wger/server` to get the latest version. (you can use `docker images` to see if your image is old)

Alternatively, you can build it yourself from your wger code checkout.
To do this, you **must** build from the project root!

```docker build -f extras/docker/development/Dockerfile --tag wger/server .```

### 3 - Start the container

docker run -ti \
-v /path/to/your/wger/checkout:/home/wger/src \
Expand All @@ -37,7 +53,7 @@ You might also want to download the exercise images and the ingredients
docker exec wger.devel python3 manage.py download-exercise-images
docker exec wger.devel wger load-online-fixtures

### 2 - Open the Application
### 4 - Open the Application

Just open <http://localhost:8000> and log in as: **admin**, password **adminadmin**

Expand All @@ -49,20 +65,13 @@ To start developing again:

```sudo docker container start --attach wger.devel```

### 3 - Other commands
### 5 - Other commands

If you need to update the CSS/JS libraries or just issue some other command:

docker exec -ti wger.devel yarn
docker exec -ti wger.devel /bin/bash

## Building

If you build this yourself, keep in mind that you **must** build from the
project root!

```docker build -f extras/docker/development/Dockerfile --tag wger/server .```

## Contact

Feel free to contact us if you found this useful or if there was something that
Expand Down

0 comments on commit dd9c9f8

Please sign in to comment.