mirror of
https://github.com/maxkratz/community-tutorials.git
synced 2024-09-08 00:02:56 +00:00
Update 01-en.md
This commit is contained in:
parent
21585d3339
commit
3db20420c5
1 changed files with 39 additions and 24 deletions
|
@ -1,7 +1,9 @@
|
|||
|
||||
|
||||
---
|
||||
title:
|
||||
title: Installing Wiki.js via Docker Compose
|
||||
description:
|
||||
level: [beginner, intermediate, advanced]
|
||||
level: [intermediate]
|
||||
updated_at: 2023-10-22
|
||||
slug:
|
||||
author_name: Patrick Meyhöfer
|
||||
|
@ -16,33 +18,42 @@ available_languages: [de, en]
|
|||
|
||||
# Introduction
|
||||
|
||||
This tutorial will guide you through the process of installing wiki.js using Docker Compose. By the end, you'll have a fully functional wiki.js instance running in a Docker container.
|
||||
This tutorial will guide you through the process of installing Wiki.js using Docker Compose. By the end, you'll have a fully functional Wiki.js instance running in a Docker container.
|
||||
|
||||
The tutorial uses the example hostname `v11111111.quicksrv.de`. This hostname needs to be replaced by the name of your own server when you perform the workflow described in this tutorial.
|
||||
|
||||
# Requirements
|
||||
|
||||
- A linux server
|
||||
- A Linux server
|
||||
- Basic understanding of shell commands.
|
||||
- The simplest VPS from netcup meets these requirements
|
||||
|
||||
The smallest netcup server meets these requirements.
|
||||
|
||||
# Step 1 - Install Docker Compose
|
||||
|
||||
If you haven't installed Docker and Docker Compose on your server, use the following commands:
|
||||
|
||||
```bash
|
||||
# Install Docker Compose
|
||||
apt install docker-compose
|
||||
```
|
||||
# Step 2 - Create a Docker Compose file for wiki.js
|
||||
Create a new directory for your wiki.js setup and navigate into it:
|
||||
|
||||
# Step 2 - Create a Docker Compose file for Wiki.js
|
||||
|
||||
Create a new directory for your Wiki.js setup and navigate into it:
|
||||
|
||||
```bash
|
||||
mkdir wikijs && cd wikijs
|
||||
```
|
||||
|
||||
Now, create a `docker-compose.yml` file using your favorite text editor (e.g., `nano`):
|
||||
|
||||
```bash
|
||||
nano docker-compose.yml
|
||||
```
|
||||
|
||||
Paste the following text into that file:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
|
@ -71,14 +82,14 @@ volumes:
|
|||
db-data:
|
||||
```
|
||||
|
||||
In this configuration:
|
||||
In this configuration, we have defined the following parameters:
|
||||
|
||||
- We define environmental variables to configure the PostgreSQL database.
|
||||
- We map port 3000 inside the wiki container to port 80 on the host, making our wiki.js instance accessible at http://v11111111.quicksrv.de.
|
||||
- `environment`: A list of environment variables set within the container.
|
||||
- `POSTGRES_DB`: The name of the database to be created.
|
||||
- `POSTGRES_USER`: The username for the database.
|
||||
- `POSTGRES_PASSWORD`: The password for the database user.
|
||||
- We define the environmental variables to configure the PostgreSQL database.
|
||||
- We map port 3000 inside the wiki container to port 80 on the host, making our Wiki.js instance accessible at http://v11111111.quicksrv.de.
|
||||
- `environment`: List of environment variables set within the container.
|
||||
- `POSTGRES_DB`: Name of the database to be created.
|
||||
- `POSTGRES_USER`: Username for the database.
|
||||
- `POSTGRES_PASSWORD`: Password for the database user.
|
||||
- **Note**: You should replace the password `wikijsrocks` with a secure password of your choice.
|
||||
- `DB_TYPE`: Type of the database, here `postgres`.
|
||||
- `DB_HOST`: Hostname of the database. Since the database is within the same Docker network, we use the service name `db`.
|
||||
|
@ -88,23 +99,27 @@ In this configuration:
|
|||
- `ports`: Determines which ports are forwarded from the host to the container.
|
||||
- `80:3000`: Forwards port 80 of the host to port 3000 inside the container.
|
||||
|
||||
When using this Docker Compose file, at a minimum, you should replace the database password with a secure password of your choice. All other configurations can be adjusted based on your requirements and infrastructure.
|
||||
When using this Docker Compose file, you should as a minimum replace the database password with a secure password of your choice. All other configuration parameters can be adjusted according to your requirements and infrastructure.
|
||||
|
||||
# Step 3 - Starting the Wiki.js containers
|
||||
|
||||
Now, run the following command to start the Wiki.js and its database containers:
|
||||
|
||||
# Step 3 - Start the wiki.js containers
|
||||
Now, run the following command to start the wiki.js and its database containers:
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
This command will download the necessary images and start the containers in detached mode.
|
||||
# Step 4 - Access the wiki.js installation
|
||||
Once the containers are up and running, open your web browser and navigate to your server's address, e.g., http://v11111111.quicksrv.de. You should see the wiki.js setup wizard. Follow the on-screen instructions to complete the installation.
|
||||
|
||||
# Step 4 - Access the Wiki.js installation
|
||||
|
||||
Once the containers are up and running, open your web browser and navigate to your server's address, e.g., http://v11111111.quicksrv.de. You should see the Wiki.js setup wizard. Follow the on-screen instructions to complete the installation.
|
||||
|
||||
# Conclusion
|
||||
Congratulations! You've successfully installed wiki.js using Docker Compose. Now you can start creating and organizing your documentation or knowledge base with ease. Remember to regularly backup your data and keep your software up to date for security reasons.
|
||||
|
||||
# Licence
|
||||
Congratulations! You've successfully installed Wiki.js using Docker Compose. You can now start to effortlessly create and organize your documentation or knowledge base. However, remember to perform regular backups of your data and to keep your software up to date for security reasons.
|
||||
|
||||
# License
|
||||
|
||||
[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE)
|
||||
|
||||
|
@ -119,10 +134,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
# Contributor's Certificate of Origin
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
1) The contribution was created in whole or in part by me and I have the right to submit it under the licence indicated in the file; or
|
||||
1) The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or
|
||||
|
||||
2) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate licence and I have the right under that licence to submit that work with modifications, whether created in whole or in part by me, under the same licence (unless I am permitted to submit under a different licence), as indicated in the file; or
|
||||
2) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or
|
||||
|
||||
3) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
|
||||
|
||||
4) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved.
|
||||
4) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.
|
||||
|
|
Loading…
Reference in a new issue