Skip to content

Commit

Permalink
Add docker file for local development (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vstumpf authored Jan 12, 2024
1 parent 4d8bf3e commit ccfc99a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,20 @@ Each time a commit is pushed to the master branch, the site is automatically reb
## Contributing
If you would like to contribute to this project, please read the [Contributing Guide](CONTRIBUTING.md).

## Development
You can use the included dockerfile to create a docker container for development. Run the following commands in the root directory of the project (where this file is).

### Build the container

`docker build -f docker/Dockerfile -t ra-user-guides .`

This uses the same base image as the github actions, then installs the extra packages in `.github/requirements.txt`. You only need to do this once, or every time the list of requirements change.

### Run the container

`docker run --rm -it -p 8000:8000 -v ${PWD}:/docs ra-user-guides`

This runs the container we made in step one, mounts our current directory to `/docs` in the container, and opens the `8000` port. This will watch for changes as we make them. You can see the changes in your browser by going to `localhost:8000/user-guides`

## License
This project is licensed under the same terms as rAthena's [Source Code](https://github.com/rathena/rathena) - see the [LICENSE](https://github.com/rathena/rathena/blob/master/LICENSE) file for details.
8 changes: 8 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM squidfunk/mkdocs-material:9.0.6

RUN apk add --no-cache bash

COPY .github/requirements.txt /requirements.txt

RUN pip install -r /requirements.txt

1 change: 1 addition & 0 deletions docker/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git

0 comments on commit ccfc99a

Please sign in to comment.