aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc
diff options
context:
space:
mode:
Diffstat (limited to 'support/doc')
-rw-r--r--support/doc/docker-traefik.md44
-rw-r--r--support/doc/docker.md71
2 files changed, 63 insertions, 52 deletions
diff --git a/support/doc/docker-traefik.md b/support/doc/docker-traefik.md
new file mode 100644
index 000000000..fcd63364a
--- /dev/null
+++ b/support/doc/docker-traefik.md
@@ -0,0 +1,44 @@
1### Docker + Traefik
2
3After following the [docker guide](/support/doc/docker.md), you can choose to run traefik
4as your reverse-proxy.
5
6#### Create the reverse proxy configuration directory
7
8```shell
9mkdir -p ./docker-volume/traefik
10```
11
12#### Get the latest reverse proxy configuration
13
14```shell
15curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/config/traefik.toml > ./docker-volume/traefik/traefik.toml
16```
17
18View the source of the file you're about to download: [traefik.toml](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/config/traefik.toml)
19
20#### Create Let's Encrypt ACME certificates as JSON file
21
22```shell
23touch ./docker-volume/traefik/acme.json
24```
25Needs to have file mode 600:
26```shell
27chmod 600 ./docker-volume/traefik/acme.json
28```
29
30#### Update the reverse proxy configuration
31
32```shell
33$EDITOR ./docker-volume/traefik/traefik.toml
34```
35
36~~You must replace `<MY EMAIL ADDRESS>` and `<MY DOMAIN>` to enable Let's Encrypt SSL Certificates creation.~~ Now included in `.env` file with `TRAEFIK_ACME_EMAIL` and `TRAEFIK_ACME_DOMAINS` variables used through traefik service command value of `docker-compose.yml` file.
37
38More at: https://docs.traefik.io/v1.7
39
40#### Run with traefik
41
42```shell
43docker-compose -f {docker-compose.yml,docker-compose.traefik.yml} up -d
44```
diff --git a/support/doc/docker.md b/support/doc/docker.md
index fc89e4c4c..e55aee9fc 100644
--- a/support/doc/docker.md
+++ b/support/doc/docker.md
@@ -1,46 +1,19 @@
1# Docker guide 1# Docker guide
2 2
3You can quickly get a server running using Docker. You need to have 3This guide requires [docker](https://www.docker.com/community-edition) and
4[docker](https://www.docker.com/community-edition) and
5[docker-compose](https://docs.docker.com/compose/install/) installed. 4[docker-compose](https://docs.docker.com/compose/install/) installed.
6 5
7## Production 6## Production
8 7
9### Install 8### Install
10 9
11**PeerTube does not support webserver host change**. Keep in mind your domain name is definitive after your first PeerTube start. 10**PeerTube does not support webserver host change**. Keep in mind your domain
12 11name is definitive after your first PeerTube start.
13PeerTube needs a PostgreSQL and a Redis instance to work correctly. If you want
14to quickly set up a full environment, either for trying the service or in
15production, you can use a `docker-compose` setup.
16 12
17#### Go to your peertube workdir 13#### Go to your peertube workdir
18```shell
19cd /your/peertube/directory
20```
21
22#### Create the reverse proxy configuration directory
23
24```shell
25mkdir -p ./docker-volume/traefik
26```
27 14
28#### Get the latest reverse proxy configuration
29
30```shell
31curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/config/traefik.toml > ./docker-volume/traefik/traefik.toml
32```
33
34View the source of the file you're about to download: [traefik.toml](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/config/traefik.toml)
35
36#### Create Let's Encrypt ACME certificates as JSON file
37
38```shell
39touch ./docker-volume/traefik/acme.json
40```
41Needs to have file mode 600:
42```shell 15```shell
43chmod 600 ./docker-volume/traefik/acme.json 16cd /your/peertube/directory
44``` 17```
45 18
46#### Get the latest Compose file 19#### Get the latest Compose file
@@ -51,7 +24,6 @@ curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker
51 24
52View the source of the file you're about to download: [docker-compose.yml](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/docker-compose.yml) 25View the source of the file you're about to download: [docker-compose.yml](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/docker-compose.yml)
53 26
54
55#### Get the latest env_file 27#### Get the latest env_file
56 28
57```shell 29```shell
@@ -60,27 +32,18 @@ curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/master/support/docker
60 32
61View the source of the file you're about to download: [.env](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/.env) 33View the source of the file you're about to download: [.env](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/.env)
62 34
63#### Update the reverse proxy configuration
64
65```shell
66vim ./docker-volume/traefik/traefik.toml
67```
68
69~~You must replace `<MY EMAIL ADDRESS>` and `<MY DOMAIN>` to enable Let's Encrypt SSL Certificates creation.~~ Now included in `.env` file with `TRAEFIK_ACME_EMAIL` and `TRAEFIK_ACME_DOMAINS` variables used through traefik service command value of `docker-compose.yml` file.
70
71More at: https://docs.traefik.io/v1.7
72
73#### Tweak the `docker-compose.yml` file there according to your needs 35#### Tweak the `docker-compose.yml` file there according to your needs
74 36
75```shell 37```shell
76vim ./docker-compose.yml 38$EDITOR ./docker-compose.yml
77``` 39```
78 40
79#### Then tweak the `.env` file to change the environment variables 41#### Then tweak the `.env` file to change the environment variables
80 42
81```shell 43```shell
82vim ./.env 44$EDITOR ./.env
83``` 45```
46
84In the downloaded example [.env](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/.env), you must replace: 47In the downloaded example [.env](https://github.com/Chocobozzz/PeerTube/blob/master/support/docker/production/.env), you must replace:
85- `<MY POSTGRES USERNAME>` 48- `<MY POSTGRES USERNAME>`
86- `<MY POSTGRES PASSWORD>` 49- `<MY POSTGRES PASSWORD>`
@@ -103,10 +66,12 @@ To test locally your Docker setup, you must add your domain (`<MY DOMAIN>`) in `
103```shell 66```shell
104docker-compose up 67docker-compose up
105``` 68```
106### Obtaining Your Automatically Generated Admin Credentials 69
107Now that you've installed your PeerTube instance you'll want to grep your peertube container's logs for the `root` password. 70### Obtaining your automatically-generated admin credentials
108You're going to want to run `docker-compose logs peertube | grep -A1 root` to search the log output for your new PeerTube's instance admin credentials which will look something like this. 71
109```BASH 72Now that you've installed your PeerTube instance you'll want to grep your peertube container's logs for the `root` password. You're going to want to run `docker-compose logs peertube | grep -A1 root` to search the log output for your new PeerTube's instance admin credentials which will look something like this.
73
74```bash
110user@s:~/peertube|master⚡ ⇒ docker-compose logs peertube | grep -A1 root 75user@s:~/peertube|master⚡ ⇒ docker-compose logs peertube | grep -A1 root
111 76
112peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root 77peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root
@@ -114,9 +79,12 @@ peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abc
114``` 79```
115 80
116### Obtaining Your Automatically Generated DKIM DNS TXT Record 81### Obtaining Your Automatically Generated DKIM DNS TXT Record
82
117[DKIM](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) signature sending and RSA keys generation are enabled by the default Postfix image `mwader/postfix-relay` with [OpenDKIM](http://www.opendkim.org/). 83[DKIM](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) signature sending and RSA keys generation are enabled by the default Postfix image `mwader/postfix-relay` with [OpenDKIM](http://www.opendkim.org/).
118Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain : 84
119```BASH 85Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain :
86
87```bash
120user@s:~/peertube|master⚡ ⇒ cat ./docker-volume/opendkim/keys/*/*.txt 88user@s:~/peertube|master⚡ ⇒ cat ./docker-volume/opendkim/keys/*/*.txt
121 89
122peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; " 90peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
@@ -154,5 +122,4 @@ $ docker build . -f ./support/docker/production/Dockerfile.buster
154 122
155## Development 123## Development
156 124
157We don't have a Docker image for development. See [the CONTRIBUTING guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md#develop) 125We don't have a Docker image for development. See [the CONTRIBUTING guide](https://github.com/Chocobozzz/PeerTube/blob/master/.github/CONTRIBUTING.md#develop) for more information on how you can hack PeerTube!
158for more information on how you can hack PeerTube!