Skip to content

Commit 7d46519

Browse files
AdministratorNGPixel
Administrator
authored andcommitted
docs: update install/docker
1 parent 25dfb36 commit 7d46519

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

install/docker.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Docker
33
description: Getting started with the Docker image
44
published: true
5-
date: 2021-08-20T03:39:01.589Z
5+
date: 2022-02-11T22:48:39.365Z
66
tags: setup, docker
77
editor: markdown
88
dateCreated: 2019-02-15T04:23:08.720Z
@@ -13,15 +13,15 @@ dateCreated: 2019-02-15T04:23:08.720Z
1313

1414
# Using the Docker image
1515

16-
Wiki.js is published as a Docker image on Docker Hub as `requarks/wiki` and on GitHub Packages as `ghcr.io/requarks/wiki`
16+
Wiki.js is published as a Docker image on GitHub Packages as `ghcr.io/requarks/wiki` and on Docker Hub as `requarks/wiki`.
1717

18-
> It's highly recommended that you don't use the `latest` tag but instead the major version you need, e.g. `requarks/wiki:2`
18+
> It's highly recommended that you don't use the `latest` tag but instead the major version you need, e.g. `ghcr.io/requarks/wiki:2`
1919
>
20-
> It's also possible to point to a specific minor version (e.g. `requarks/wiki:2.5`), although you will not automatically get the latest features when pulling the latest image.
20+
> It's also possible to point to a specific minor version (e.g. `ghcr.io/requarks/wiki:2.5`), although you will not automatically get the latest features when pulling the latest image.
2121
{.is-info}
2222

23-
- View on [Docker Hub](https://hub.docker.com/r/requarks/wiki)
2423
- View on [GitHub Packages](https://github.com/Requarks/wiki/pkgs/container/wiki)
24+
- View on [Docker Hub](https://hub.docker.com/r/requarks/wiki)
2525

2626
## Environment Variables
2727
You must set the following environment variables. They are all **required** unless specified otherwise.
@@ -94,12 +94,12 @@ When running Wiki.js with multiple replicas (e.g. Kubernetes cluster / Docker Sw
9494

9595
Here's an example of a command to run Wiki.js connecting to a PostgreSQL database:
9696
```bash
97-
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" requarks/wiki:2
97+
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:2
9898
```
9999

100100
or to a MySQL database:
101101
```bash
102-
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=mysql" -e "DB_HOST=db" -e "DB_PORT=3306" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" requarks/wiki:2
102+
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=mysql" -e "DB_HOST=db" -e "DB_PORT=3306" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:2
103103
```
104104

105105
> Both examples assume you have a database running in another container named `db` on the same network.
@@ -108,7 +108,7 @@ docker run -d -p 8080:3000 --name wiki --restart unless-stopped -e "DB_TYPE=mysq
108108

109109
Let's Encrypt example:
110110
```bash
111-
docker run -d -p 80:3000 -p 443:3443 -e "LETSENCRYPT_DOMAIN=wiki.example.com" -e "[email protected]" --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" requarks/wiki:2
111+
docker run -d -p 80:3000 -p 443:3443 -e "LETSENCRYPT_DOMAIN=wiki.example.com" -e "[email protected]" --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:2
112112
```
113113

114114
## Alternative: Mount the config file
@@ -118,7 +118,7 @@ If using environment variables is not your cup of tea, you can also mount a conf
118118
Create a new file based on the [sample config file](https://github.com/Requarks/wiki/blob/master/config.sample.yml) and modify the values to match your setup. You can then mount the config file in the container:
119119

120120
```bash
121-
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -v YOUR-FILE.yml:/wiki/config.yml requarks/wiki:2
121+
docker run -d -p 8080:3000 --name wiki --restart unless-stopped -v YOUR-FILE.yml:/wiki/config.yml ghcr.io/requarks/wiki:2
122122
```
123123

124124
It's also possible to define an alternate location for the config file to be loaded from, using the CONFIG_FILE env variable. This is useful in scenarios where you want to mount a configuration folder instead.
@@ -131,7 +131,7 @@ It's also possible to define an alternate location for the config file to be loa
131131
By default, Wiki.js runs as user `wiki`. If you get permissions issues while mounting files (such as SQLite db or private keys), you can override the runtime user to run as `root` using the `-u` parameter, e.g.:
132132

133133
```bash
134-
docker run -d -p 8080:3000 -u="root" --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" requarks/wiki:2
134+
docker run -d -p 8080:3000 -u="root" --name wiki --restart unless-stopped -e "DB_TYPE=postgres" -e "DB_HOST=db" -e "DB_PORT=5432" -e "DB_USER=wikijs" -e "DB_PASS=wikijsrocks" -e "DB_NAME=wiki" ghcr.io/requarks/wiki:2
135135
```
136136

137137
This is however not a secure way to run containers. Make sure you understand the security implications before doing so.
@@ -157,7 +157,7 @@ services:
157157
- db-data:/var/lib/postgresql/data
158158

159159
wiki:
160-
image: requarks/wiki:2
160+
image: ghcr.io/requarks/wiki:2
161161
depends_on:
162162
- db
163163
environment:

0 commit comments

Comments
 (0)