Skip to content

Commit def5749

Browse files
committed
Getting Started to DokuWiki Docker
1 parent edffb2a commit def5749

File tree

7 files changed

+255
-37
lines changed

7 files changed

+255
-37
lines changed
Loading

data/pages/howto/getting_started/1_dokuwiki.txt

+106-15
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,127 @@
55
{ "path": ":wiki:markup_docs:getting_started:1_dokuwiki" },
66
{ "path": ":wiki:markup_getting_started:1_dokuwiki" }
77
],
8-
"name": "Dokuwiki Installation",
9-
"page_id": "52gxusbx7sb0v76bgvn9v",
10-
"template": "holy",
11-
"title": "How to install Dokuwiki ?"
8+
"name": "Dokuwiki Up and Running",
9+
"page_id": "52gxusbx7sb0v76bgvn9v"
1210
}
1311
---
14-
====== ComboStrap Getting Started - Dokuwiki Instance ======
12+
====== How to get DokuWiki Up and Running? ======
1513

1614
===== About =====
17-
Because [[:combostrap|ComboStrap]] is built on top of the [[doku>|Dokuwiki Engine]], the first step is to have a DokuWiki Installation.
15+
Because [[:combostrap|ComboStrap]] is built on top of the [[doku>|Dokuwiki Engine]], the first step is to have a DokuWiki app up and running.
1816

17+
This article will show you how.
1918

20-
We supports two kind of installation:
21-
* [[#Docker|Docker]] - our image that comes with battery included
22-
* [[#server|Standalone Server]] - on a raw server
2319

20+
===== Docker / Server =====
2421

25-
===== Type =====
22+
This tutorial series uses our [[:docs:admin:docker|Docker image]] for consistency
23+
but if you have a standalone server and want to install DokuWiki on it, you can also follow this [[howto:server_installation:start|tutorial series]].
2624

2725

28-
==== Docker ====
2926

27+
===== Steps =====
3028

31-
We recommend greatly to start with [[#docker|Docker]] as:
29+
We recommend greatly to use our [[:docs:admin:docker|DokuWiki in Docker image]] as:
3230
* it's the easiest way to get DokuWiki up and running
3331
* it contains all performance cache system (php-fpm and opcache)
34-
* a Server DokuWiki installation is not easy and straightforward.
32+
* a Server DokuWiki installation is not easy and straightforward
33+
* and [[:docs:admin:docker#features|more]].
3534

3635

37-
==== Server ====
36+
==== Install Docker ====
3837

39-
To get DokuWiki on a server, you can follow this [[howto:server_installation:start|installation tutorial]]
4038

39+
Download the Docker binary or install a package as explained on this [[https://docs.docker.com/engine/install/|article]].
40+
41+
42+
==== On Windows? ====
43+
44+
On Windows, you need to install WSL by following this [[https://learn.microsoft.com/en-us/windows/wsl/install|instructions]].
45+
Why? Because Php is still a Linux and C technology that is really slow on Windows. This is architectural as explained on [[https://github.com/docker/for-win/issues/6742|this issue]]
46+
47+
==== Create a data directory ====
48+
* Create a directory to store the DokuWiki Data
49+
<code bash>
50+
mkdir -p ~/site-combo-starter
51+
</code>
52+
* And go into it to change the current directory
53+
<code bash>
54+
cd site-combo-starter
55+
</code>
56+
57+
==== Start DokuWiki in Docker ====
58+
59+
Start a DokuWiki Docker Instance with the following command.
60+
<code bash>
61+
docker run \
62+
--name site-combo-starter \
63+
--rm \
64+
-p 8080:80 \
65+
--user 1000:1000 \
66+
-e DOKU_DOCKER_ACL_POLICY='public' \
67+
-e DOKU_DOCKER_ADMIN_NAME='admin' \
68+
-e DOKU_DOCKER_ADMIN_PASSWORD='welcome' \
69+
-v $PWD:/var/www/html \
70+
ghcr.io/combostrap/dokuwiki:php8.3-latest
71+
</code>
72+
where:
73+
* ''DOKU_DOCKER_ACL_POLICY='public''' will configure a wiki that can only be seen by the public. You need to login to modify it.
74+
* ''DOKU_DOCKER_ADMIN_NAME='admin''' create a user named ''admin'' with the ''admin'' permission.
75+
* ''DOKU_DOCKER_ADMIN_PASSWORD='welcome''' is the password of the admin user
76+
* ''%%-v $PWD:/var/www/html%%'' mount your current directory ''PWD'' into the image at the HTML server root ''/var/www/html''
77+
* ''--user 1000:1000'' will create file as if it were you creating them. The user ''1000'' is the UID of your Desktop user (in Windows WSL at least)
78+
79+
80+
81+
82+
83+
84+
==== Check that the instance has started ====
85+
86+
The command above will:
87+
* start php,
88+
* install DokuWiki,
89+
* install the [[https://github.com/ComboStrap/site-starter|starter site]]
90+
* and is ready when you see this lines:
91+
<console>
92+
INFO success: caddy entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
93+
INFO success: php_error_log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
94+
INFO success: php_fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
95+
</console>
96+
* You can then access DokuWiki at http://localhost:8080
97+
98+
{{:howto:getting_started:site-starter-home-page-snapshot.png?600|}}
99+
100+
101+
<note>
102+
=== How to stop the instance ===
103+
104+
If you want to stop the instance:
105+
* you can press ''Control+C'' with your keyboard in the current terminal
106+
* Or you can open another terminal and stop it with the following command
107+
<code bash>
108+
docker stop site-combo-starter
109+
</code>
110+
</note>
111+
112+
113+
==== Login ====
114+
115+
116+
Go to the [[http://localhost:8080/?do=login|login page]]: http://localhost:8080/?do=login
117+
118+
And enter the credentials:
119+
* user: ''admin''
120+
* password: ''welcome''
121+
122+
123+
124+
125+
===== Next Step =====
126+
127+
In the next step, you will learn to install a ''favicon''
128+
129+
<button color='white'>
130+
[[:howto:getting_started:6_favicon|Configure a Favicon]]
131+
</button>

data/pages/howto/getting_started/6_favicon.txt

+17-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ In our case we have chosen an icon directly from https://materialdesignicons.com
3737

3838
==== Upload the favicons ====
3939

40-
* Then upload the below icon files with the [[doku>media_manager|media manager]] to the root location (ie DOKUWIKI_HOME/data/media/)
40+
* Then upload the below icon files with the [[http://localhost:8080/start?ns=&tab_files=files&do=media|Media Manager]] (([[doku>media_manager|media manager]])) to the root location (ie DOKUWIKI_HOME/data/media/)
41+
* Click on this link [[http://localhost:8080/start?ns=&tab_files=files&do=media]] and upload the following files
4142
* ''favicon.ico''
4243
* ''favicon-32x32.png''
4344
* ''favicon-16x16.png''
@@ -80,15 +81,24 @@ The [[docs:social:facebook|facebook page]] will tell your more about the specifi
8081
{{strap:favicon_verification.png|}}
8182

8283

83-
==== OpenSearch Favicon ====
84-
85-
In the [[docs:app:search|open search]], unfortunately, the icon is the icon of the template and is [[https://github.com/dokuwiki/dokuwiki/blob/master/lib/exe/opensearch.php#L17|hardcoded]], there is nothing we can do to change it at this place.
86-
We still advertise it via [[:docs:type:website#internal_search_engine|sitelinks]] to search engines.
8784

88-
If you want it also at this place, you need to put it manually on the server at ''%%$DOKUWIKI_HOME/lib/tpl/dokuwiki/images/favicon.ico%%''.
8985

9086
==== Next Step ====
9187

9288
<btn color="white">
93-
[[7_menu|Create a menu]]
89+
[[7_menu|Create a top navigation menu]]
9490
</btn>
91+
92+
\\
93+
\\
94+
\\
95+
96+
===== Support =====
97+
98+
==== OpenSearch Favicon ====
99+
100+
In the [[docs:app:search|open search]], unfortunately, the icon is the icon of the template and is [[https://github.com/dokuwiki/dokuwiki/blob/master/lib/exe/opensearch.php#L17|hardcoded]], there is nothing we can do to change it at this place.
101+
102+
We advertise it via [[:docs:type:website#internal_search_engine|sitelinks]] to search engines.
103+
104+
Most of the search engine, support it this ways, if you really **really** want it, you need to put it manually at ''%%$DOKUWIKI_HOME/lib/tpl/dokuwiki/images/favicon.ico%%''.

data/pages/howto/getting_started/7_menu.txt

+11-14
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ This is where we will create a [[docs:menubar:menubar|menu bar]].
2222

2323
===== Steps=====
2424

25-
* Create a page called '':slot_header'' at the [[:docs:page:system:home|home level]] . ie, with the following URL:
26-
<code>
27-
http://yourdomain.com/doku.php?id=slot_header
28-
</code>
29-
* Enter the below [[docs:menubar:menubar|menu bar]] example
30-
25+
* Go to this URL http://localhost:8080/doku.php?id=slot_header to create a page called '':slot_header'' at the [[:docs:page:system:home|home level]]
26+
* You will see the [[docs:menubar:menubar|menu bar]] of the starter site.
3127

32-
33-
If you have uploaded a icon in the [[6_favicon|Favicon step]], a minimal ''header slot'' with a [[docs:menubar:menubar|menu bar]] would look like:
28+
You can:
29+
* modify it
30+
* or enter a more complicated example. If you have uploaded a icon in the [[6_favicon|Favicon step]], a minimal ''header slot'' with a [[docs:menubar:menubar|menu bar]] would look like:
3431

3532
<webcode name="Default" iframe>
3633
<code dw>
@@ -57,11 +54,11 @@ My Brand name
5754
More ... see the [[docs:menubar:menubar|menu bar page]]
5855

5956
===== Next Steps =====
60-
In the same way, you can also modify the [[docs:theme:element:page-footer|page footer]].
6157

62-
Then you can:
63-
* Check the [[docs:component|UI Components]]
64-
* Learn about [[docs:router:router|Routing and redirections]]
65-
* Have a look at the [[docs:seo:seo|SEO page]]
58+
In the same way, you can also modify the [[docs:theme:element:page-footer|page footer]] with the following link: http://localhost:8080/doku.php?id=slot_footer
59+
60+
In the next step, we will store your site as combo site in Git.
6661

67-
For more tips and tops, you can also [[:newsletter|subscribe to the newsletter]].
62+
<button color='white'>
63+
[[8_git|Store my WebSite in Git]]
64+
</button>
+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---json
2+
{
3+
"aliases": [
4+
{ "path": ":howto:getting_started:5_git" }
5+
],
6+
"name": "Git Site",
7+
"page_id": "4335hckjomaayfepj2m1v"
8+
}
9+
---
10+
====== How to store your site in Git? ======
11+
12+
13+
===== About =====
14+
This page will show you how to store your site as [[:docs:admin:website|combo site]] in a remote Git repository.
15+
16+
17+
===== Steps =====
18+
19+
==== Create a remote Git Repository ====
20+
We will be using [[https://github/com|GitHub]] as example but you can use any Git Repository Provider such as [[https://gogs.io/|Gogs]], [[https://gitlab.com|GitLab]] or [[https://gitea.com/|Gitea]].
21+
22+
For GitHub, follow this [[https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository|article]] to create your new repository.
23+
24+
25+
26+
27+
28+
29+
==== Create a local Git Repository ====
30+
31+
In the directory that was used with the [[howto:getting_started:1_dokuwiki|docker command]], initialize a Git repository
32+
<code bash>
33+
cd /tmp/site-combo-starter
34+
# Init (ie create ) a local repo
35+
git init
36+
</code>
37+
* Rename the master branch to main
38+
<code bash>
39+
git branch -M main
40+
</code>
41+
42+
==== Add the Git remote ====
43+
44+
* Add the URL of your repository as origin
45+
<code bash>
46+
git remote add origin https://github.com/ComboStrap/site-starter.git
47+
</code>
48+
49+
==== Check the untracked files ====
50+
51+
<code bash>
52+
git status
53+
</code>
54+
<console>
55+
On branch main
56+
57+
No commits yet
58+
59+
Untracked files:
60+
(use "git add <file>..." to include in what will be committed)
61+
.gitattributes
62+
.gitignore
63+
README.md
64+
conf/
65+
data/
66+
docs/
67+
lib/
68+
robots.txt
69+
70+
nothing added to commit but untracked files present (use "git add" to track)
71+
</console>
72+
==== Add the combo site files ====
73+
74+
Add them all
75+
<code bash>
76+
git add .
77+
</code>
78+
79+
==== Create your first commit ====
80+
81+
* Create a commit
82+
<code bash>
83+
git commit -m "First commit"
84+
</code>
85+
86+
==== Push them to your remote repository ====
87+
88+
* Push
89+
<code bash>
90+
git push -u origin main
91+
# enter your credentials
92+
# or use SSH Keys (https://docs.github.com/en/authentication/connecting-to-github-with-ssh)
93+
</code>
94+
<console>
95+
Enumerating objects: 45, done.
96+
Counting objects: 100% (45/45), done.
97+
Delta compression using up to 16 threads
98+
Compressing objects: 100% (36/36), done.
99+
Writing objects: 100% (45/45), 50.71 KiB | 10.14 MiB/s, done.
100+
Total 45 (delta 1), reused 0 (delta 0), pack-reused 0
101+
remote: Resolving deltas: 100% (1/1), done.
102+
To github.com:ComboStrap/site-starter.git
103+
* [new branch] main -> main
104+
branch 'main' set up to track 'origin/main'.
105+
</console>
106+
107+
===== Next =====
108+
109+
You can now develop, change your wiki and push your change to your Git Repository.
110+
111+
Then you can:
112+
* Check the [[docs:component|UI Components]]
113+
* Learn about [[docs:router:router|Routing and redirections]]
114+
* Have a look at the [[docs:seo:seo|SEO page]]
115+
116+
For more tips and tops, you can also [[:newsletter|subscribe to the newsletter]].
117+
118+
119+

data/pages/howto/getting_started/getting_started.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This ''how-to'' guide regroups a series of article to get you started.
2828
- [[1_dokuwiki]]
2929
- [[6_favicon]]
3030
- [[7_menu]]
31+
- [[5_git]]
3132

3233
===== Start =====
3334
<btn>
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<page-explorer tree></page-explorer>
1+
<page-explorer tree></page-explorer>

0 commit comments

Comments
 (0)