Skip to content

Commit fcea864

Browse files
authored
Merge branch 'docker-doc-setup' into poc-dockerize-doc-generation
2 parents 7cd547c + b54bf0e commit fcea864

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ RUN sed -i 's/\r$//' /usr/local/bin/entrypoint.sh && chmod +x /usr/local/bin/ent
4646
EXPOSE 8000
4747
RUN chmod -R 777 /var/www
4848
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
49-

.docker/entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
23
# POSIX-compliant entrypoint for building PHP documentation
34
# Fully compatible with Linux, Alpine, and macOS environments
45

@@ -94,6 +95,7 @@ done
9495

9596
if [ -d "$OUTDIR" ]; then
9697
echo "✅ Build complete: $OUTDIR"
98+
echo "View the documentation on http://localhost:8000"
9799
else
98100
echo "❌ No output directory found in /var/www/$LANGUAGE/output/"
99101
ls -R "/var/www/$LANGUAGE/output" || true

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ It builds and serves the PHP manual locally in any translation
4040
(English by default, or another language via `LANGUAGE`).
4141

4242
#### Prerequisites
43+
4344
- Docker ≥ 24 and Docker Compose ([install guide](https://docs.docker.com/get-docker/))
4445
- Local clone structure:
4546
```
4647
php-doc/
4748
├─ doc-base/ ← common build files, scripts, entities, configure.php
4849
├─ doc-en/ ← English manual (contains this Docker setup)
49-
└─ doc-fr/ ← French manual or you official language repository (doc-es, doc-ja...)
50+
└─ doc-fr/ ← French manual or your official language repository (doc-es, doc-ja...)
5051
```
5152

5253
#### Usage
54+
5355
From inside `php-doc/doc-en/`:
5456

5557
```bash
@@ -65,13 +67,13 @@ LANGUAGE=fr docker compose up --build
6567
```bash
6668
$env:LANGUAGE="fr"; docker compose up --build
6769

68-
Remove-Item Env:LANGUAGE # To remove the variable:
70+
Remove-Item Env:LANGUAGE # Revert back to English
6971
```
7072
The process will:
7173

72-
1. Build a minimal PHP 8.2 environment with PhD
74+
1. Build a minimal PHP 8.2 environment with PhD.
7375
2. Generate `.manual.xml` and render the manual in HTML (php-chunked-xhtml).
74-
3. Start a local PHP web server on http://localhost:8000
76+
3. Start a local PHP web server on http://localhost:8000 where you can view the documentation.
7577

7678
## Translations
7779

0 commit comments

Comments
 (0)