diff options
-rw-r--r-- | support/doc/docker-traefik.md | 2 | ||||
-rw-r--r-- | support/doc/docker.md | 12 | ||||
-rw-r--r-- | support/docker/production/docker-compose.yml | 11 | ||||
-rw-r--r-- | support/docker/production/entrypoint.nginx.sh | 2 |
4 files changed, 15 insertions, 12 deletions
diff --git a/support/doc/docker-traefik.md b/support/doc/docker-traefik.md index fcd63364a..eb480ec53 100644 --- a/support/doc/docker-traefik.md +++ b/support/doc/docker-traefik.md | |||
@@ -40,5 +40,5 @@ More at: https://docs.traefik.io/v1.7 | |||
40 | #### Run with traefik | 40 | #### Run with traefik |
41 | 41 | ||
42 | ```shell | 42 | ```shell |
43 | docker-compose -f {docker-compose.yml,docker-compose.traefik.yml} up -d | 43 | docker-compose -f docker-compose.yml docker-compose.traefik.yml up -d |
44 | ``` | 44 | ``` |
diff --git a/support/doc/docker.md b/support/doc/docker.md index e55aee9fc..cf3a0db0b 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md | |||
@@ -1,7 +1,7 @@ | |||
1 | # Docker guide | 1 | # Docker guide |
2 | 2 | ||
3 | This guide requires [docker](https://www.docker.com/community-edition) and | 3 | This guide requires [docker](https://www.docker.com/community-edition) and |
4 | [docker-compose](https://docs.docker.com/compose/install/) installed. | 4 | [docker-compose](https://docs.docker.com/compose/install/). |
5 | 5 | ||
6 | ## Production | 6 | ## Production |
7 | 7 | ||
@@ -10,7 +10,9 @@ This guide requires [docker](https://www.docker.com/community-edition) and | |||
10 | **PeerTube does not support webserver host change**. Keep in mind your domain | 10 | **PeerTube does not support webserver host change**. Keep in mind your domain |
11 | name is definitive after your first PeerTube start. | 11 | name is definitive after your first PeerTube start. |
12 | 12 | ||
13 | #### Go to your peertube workdir | 13 | #### Go to your workdir |
14 | |||
15 | _note_: the guide that follows assumes an empty workdir, but you can also clone the repository, use the master branch and `cd support/docker/production`. | ||
14 | 16 | ||
15 | ```shell | 17 | ```shell |
16 | cd /your/peertube/directory | 18 | cd /your/peertube/directory |
@@ -38,7 +40,7 @@ View the source of the file you're about to download: [.env](https://github.com/ | |||
38 | $EDITOR ./docker-compose.yml | 40 | $EDITOR ./docker-compose.yml |
39 | ``` | 41 | ``` |
40 | 42 | ||
41 | #### Then tweak the `.env` file to change the environment variables | 43 | #### Then tweak the `.env` file to change the environment variables settings |
42 | 44 | ||
43 | ```shell | 45 | ```shell |
44 | $EDITOR ./.env | 46 | $EDITOR ./.env |
@@ -72,7 +74,7 @@ docker-compose up | |||
72 | Now 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. | 74 | Now 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 | 75 | ||
74 | ```bash | 76 | ```bash |
75 | user@s:~/peertube|master⚡ ⇒ docker-compose logs peertube | grep -A1 root | 77 | $ docker-compose logs peertube | grep -A1 root |
76 | 78 | ||
77 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root | 79 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.082 info: Username: root |
78 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abcdefghijklmnop | 80 | peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abcdefghijklmnop |
@@ -85,7 +87,7 @@ peertube_1 | [example.com:443] 2019-11-16 04:26:06.083 info: User password: abc | |||
85 | Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain : | 87 | Run `cat ./docker-volume/opendkim/keys/*/*.txt` to display your DKIM DNS TXT Record containing the public key to configure to your domain : |
86 | 88 | ||
87 | ```bash | 89 | ```bash |
88 | user@s:~/peertube|master⚡ ⇒ cat ./docker-volume/opendkim/keys/*/*.txt | 90 | $ cat ./docker-volume/opendkim/keys/*/*.txt |
89 | 91 | ||
90 | peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; " | 92 | peertube._domainkey.mydomain.tld. IN TXT ( "v=DKIM1; h=sha256; k=rsa; " |
91 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Dx7wLGPFVaxVQ4TGym/eF89aQ8oMxS9v5BCc26Hij91t2Ci8Fl12DHNVqZoIPGm+9tTIoDVDFEFrlPhMOZl8i4jU9pcFjjaIISaV2+qTa8uV1j3MyByogG8pu4o5Ill7zaySYFsYB++cHJ9pjbFSC42dddCYMfuVgrBsLNrvEi3dLDMjJF5l92Uu8YeswFe26PuHX3Avr261n" | 93 | "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Dx7wLGPFVaxVQ4TGym/eF89aQ8oMxS9v5BCc26Hij91t2Ci8Fl12DHNVqZoIPGm+9tTIoDVDFEFrlPhMOZl8i4jU9pcFjjaIISaV2+qTa8uV1j3MyByogG8pu4o5Ill7zaySYFsYB++cHJ9pjbFSC42dddCYMfuVgrBsLNrvEi3dLDMjJF5l92Uu8YeswFe26PuHX3Avr261n" |
diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml index d17dbd0df..bce9426d2 100644 --- a/support/docker/production/docker-compose.yml +++ b/support/docker/production/docker-compose.yml | |||
@@ -6,6 +6,7 @@ services: | |||
6 | # nginx configuration file. It runs the default nginx configuration without HTTPS nor SSL, | 6 | # nginx configuration file. It runs the default nginx configuration without HTTPS nor SSL, |
7 | # so use it in production in tandem with an SSL-terminating reverse-proxy. | 7 | # so use it in production in tandem with an SSL-terminating reverse-proxy. |
8 | webserver: | 8 | webserver: |
9 | image: chocobozzz/peertube:webserver | ||
9 | build: | 10 | build: |
10 | context: . | 11 | context: . |
11 | dockerfile: Dockerfile.nginx | 12 | dockerfile: Dockerfile.nginx |
@@ -16,9 +17,9 @@ services: | |||
16 | # - "9000:80" # serving HTTP | 17 | # - "9000:80" # serving HTTP |
17 | volumes: | 18 | volumes: |
18 | - type: bind | 19 | - type: bind |
19 | # Switch sources if you downloaded the nginx configuration without the whole repository | 20 | # Switch sources if you downloaded the whole repository |
20 | #source: ./peertube | 21 | #source: ../../nginx/peertube |
21 | source: ../../nginx/peertube | 22 | source: ./docker-volume/nginx/peertube |
22 | target: /etc/nginx/conf.d/peertube.template | 23 | target: /etc/nginx/conf.d/peertube.template |
23 | - assets:/var/www/peertube/peertube-latest/client/dist:ro | 24 | - assets:/var/www/peertube/peertube-latest/client/dist:ro |
24 | - ./docker-volume/data:/var/www/peertube/storage | 25 | - ./docker-volume/data:/var/www/peertube/storage |
@@ -48,7 +49,7 @@ services: | |||
48 | restart: "always" | 49 | restart: "always" |
49 | 50 | ||
50 | postgres: | 51 | postgres: |
51 | image: postgres:10-alpine | 52 | image: postgres:13-alpine |
52 | env_file: | 53 | env_file: |
53 | - .env | 54 | - .env |
54 | volumes: | 55 | volumes: |
@@ -56,7 +57,7 @@ services: | |||
56 | restart: "always" | 57 | restart: "always" |
57 | 58 | ||
58 | redis: | 59 | redis: |
59 | image: redis:5-alpine | 60 | image: redis:6-alpine |
60 | volumes: | 61 | volumes: |
61 | - ./docker-volume/redis:/data | 62 | - ./docker-volume/redis:/data |
62 | restart: "always" | 63 | restart: "always" |
diff --git a/support/docker/production/entrypoint.nginx.sh b/support/docker/production/entrypoint.nginx.sh index 4d2ead966..670ce84a3 100644 --- a/support/docker/production/entrypoint.nginx.sh +++ b/support/docker/production/entrypoint.nginx.sh | |||
@@ -9,7 +9,7 @@ export PEERTUBE_HOST="peertube:9000" | |||
9 | 9 | ||
10 | envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE | 10 | envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE |
11 | 11 | ||
12 | # Remove HTTPS/SSL from nginx conf | 12 | # Remove HTTPS/SSL from nginx conf since this image is meant as a webserver _behind_ a reverse-proxy doing TLS termination itself |
13 | sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET_FILE | 13 | sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET_FILE |
14 | 14 | ||
15 | nginx -g "daemon off;" \ No newline at end of file | 15 | nginx -g "daemon off;" \ No newline at end of file |