Skip to content

Commit da77f5b

Browse files
authored
Merge pull request #2 from weeklydevchat/mrbiggred/add-docker-support
Add Docker support for local development
2 parents b832c26 + 1c26416 commit da77f5b

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,19 @@ Requirements:
3232
index.md # The documentation homepage.
3333
posts/ # blog posts, organised anyway you like
3434
... # Other markdown pages, images and other files.
35+
36+
# Docker Guide
37+
38+
To build and run the Docker container locally, follow these steps:
39+
40+
1. Build the Docker image:
41+
```sh
42+
docker build -t weeklydevchat .
43+
```
44+
45+
2. Run the Docker container:
46+
```sh
47+
docker run -p 8000:8000 weeklydevchat
48+
```
49+
50+
The MkDocs site will be served on port 8000.

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
services:
2+
app:
3+
image: python:3-slim
4+
command: mkdocs serve -a 0.0.0.0:8000
5+
entrypoint: /app/docker-entrypoint.sh
6+
working_dir: /app
7+
ports:
8+
- 8000:8000
9+
volumes:
10+
- .:/app
11+
- python-packages:/usr/local/lib/python3.x/site-packages/
12+
13+
volumes:
14+
python-packages:

docker-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
set -e
3+
4+
pip install -r requirements.txt
5+
6+
exec "$@"

0 commit comments

Comments
 (0)