Skip to content

Commit 486aef0

Browse files
authored
Merge pull request #107 from StrangeBeeCorp/readme-updates-venv
Readme updates venv
2 parents 6c08ef6 + 2eae6ba commit 486aef0

File tree

1 file changed

+66
-6
lines changed

1 file changed

+66
-6
lines changed

README.md

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,88 @@
22

33
[![Build Status](https://github.com/StrangeBeeCorp/docs/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/StrangeBeeCorp/docs/actions/workflows/pages/pages-build-deployment)
44

5-
The documentation uses mkdocs to render the content.
5+
The documentation uses MkDocs to render the content.
66

77
## Test changes
88

9+
### Option 1: Use Python locally
10+
11+
This method uses Python installed directly on your machine to run the MkDocs server.
12+
13+
#### 1. Install Python and pip (if not already installed)
14+
15+
#### 2. Create a virtual environment (recommended)
16+
A virtual environment keeps dependencies isolated and avoids conflicts.
17+
18+
##### 2.1 Create the virtual environment
19+
20+
Place it in a dedicated directory outside your project directory:
21+
```bash
22+
python3 -m venv ~/venvs/mkdocs-env
23+
```
24+
25+
##### 2.2 Activate the virtual environment
26+
27+
* Linux/macOS
28+
```bash
29+
source ~/venvs/mkdocs-env/bin/activate
30+
```
31+
32+
* Windows (Command Prompt)
33+
```cmd
34+
~/venvs/mkdocs-env\Scripts\activate
35+
```
36+
37+
* Windows (PowerShell)
38+
```powershell
39+
~/venvs/mkdocs-env\Scripts\Activate.ps1
40+
```
41+
42+
##### 2.3 Verify activation
43+
44+
The name of your environment should appear in brackets at the beginning of your command line.
45+
46+
#### 3. Install the requirements
47+
48+
In your project directory, install the required dependencies:
49+
950
```bash
10-
# Install the requirements first
11-
pip install -r requirements.txt
51+
pip3 install -r requirements.txt
52+
```
53+
54+
#### 4. Start the MkDocs server
1255

13-
# Start the mkdocs server in development mode
56+
##### 4.1 Run the MkDocs development server:
57+
58+
```bash
1459
mkdocs serve
1560
```
1661

17-
Alternatively you can use a docker container:
62+
##### 4.2 Once the server is running, open your browser and visit http://127.0.0.1:8000.
1863

64+
### Option 2: Use a Docker container
65+
66+
This method uses Docker to run the MkDocs server in an isolated container. All dependencies, including Python, are installed inside the container.
67+
68+
##### 1. Build the Docker image
69+
70+
The Docker image bundles Python, MkDocs, and all necessary dependencies:
1971
```bash
2072
docker build . -t docs
73+
```
74+
75+
##### 2. Run the Docker container
76+
77+
Start the container and expose the documentation server locally:
78+
```bash
2179
docker run -it --rm -p 8000:8000 -v $PWD:/docs docs
2280
```
2381

82+
##### 3. The documentation server will be accessible at: http://127.0.0.1:8000.
83+
2484
## Deployment
2585

26-
The `main` branch is automatically deployed to [docs.strangebee.com](https://docs.strangebee.com)
86+
The `main` branch is automatically deployed to [docs.strangebee.com](https://docs.strangebee.com).
2787

2888
If not:
2989

0 commit comments

Comments
 (0)