Skip to content

Commit 4efd620

Browse files
committed
first go at dockerizing the service
1 parent 6d7fe1e commit 4efd620

File tree

5 files changed

+39
-9
lines changed

5 files changed

+39
-9
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data/
2+
vendor/
3+
volumes/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
data/
22
vendor/
3+
volumes/

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM opengrok/docker:1.14.3
2+
3+
RUN apt-get update && \
4+
apt-get install -y \
5+
php-cli \
6+
composer \
7+
git \
8+
&& apt-get clean \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
COPY ./ /app/
12+
RUN cd /app && composer install --no-dev --optimize-autoloader
13+
14+
ENTRYPOINT ["/bin/sh", "-c", "wget https://raw.githubusercontent.com/dokuwiki/globalheader/refs/heads/main/globalheader.html -O /opengrok/data/footer_include && exec \"$@\"", "--"]
15+
CMD ["/scripts/start.py"]

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,3 @@ You can also download the current `master` of DokuWiki itself (in addition to al
2828

2929
./extensionmirror.php -w
3030

31-
## Use OpenGrok for fast search
32-
33-
Use docker to run [Opengrok](http://oracle.github.io/opengrok/) on top of the `data/src` directory:
34-
35-
docker run --rm -t -v `pwd`/data/src:/src -p 8080:8080 opengrok/docker:latest
36-
37-
The image will start to index the sources, this takes several minutes. Once it's done, you can search through the code at [http://localhost:8080/source](http://localhost:8080/source). A Cross-Reference Browser is available at [http://localhost:8080/source/xref/](http://localhost:8080/source/xref/)
38-
39-
An online version of the search is now available at https://codesearch.dokuwiki.org

docker-compose.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
extensionmirror:
3+
build: .
4+
container_name: extensionmirror
5+
restart: unless-stopped
6+
environment:
7+
SYNC_PERIOD_MINUTES: 10
8+
NOMIRROR: 1
9+
CHECK_INDEX: 1
10+
volumes:
11+
- ./volumes/data:/data
12+
- ./volumes/data/src:/opengrok/src
13+
- ./volumes/index:/opengrok/data
14+
- ./volumes/config:/opengrok/etc
15+
ports:
16+
- 8080:8080
17+
labels:
18+
chadburn.enabled: "true"
19+
chadburn.job-exec.meh-splitbrain.schedule: "@daily"
20+
chadburn.job-exec.meh-splitbrain.command: "/app/extensionmirror.php -d /data -w -g"

0 commit comments

Comments
 (0)