diff options
Diffstat (limited to 'support/doc')
-rw-r--r-- | support/doc/docker.md | 65 |
1 files changed, 50 insertions, 15 deletions
diff --git a/support/doc/docker.md b/support/doc/docker.md index 2249d14c4..e0c03a1dc 100644 --- a/support/doc/docker.md +++ b/support/doc/docker.md | |||
@@ -1,26 +1,61 @@ | |||
1 | # Docker guide | 1 | # Docker guide |
2 | 2 | ||
3 | ## Test/Development | 3 | You can quickly get a server running using Docker. You need to have |
4 | [docker](https://www.docker.com/community-edition) and | ||
5 | [docker-compose](https://docs.docker.com/compose/install/) installed. | ||
4 | 6 | ||
5 | You can quickly get a server running using Docker. You need to have [docker](https://www.docker.com/community-edition) and [docker-compose](https://docs.docker.com/compose/install/) installed. | 7 | ## Production |
8 | |||
9 | ### Build your own Docker image | ||
10 | |||
11 | ```bash | ||
12 | $ git clone https://github.com/chocobozzz/PeerTube /tmp/peertube | ||
13 | $ cd /tmp/peertube | ||
14 | $ docker build . -f ./support/docker/production/Dockerfile.stretch | ||
15 | ``` | ||
6 | 16 | ||
7 | For this example configuration, you should also run a reverse proxy. The example | 17 | ### Run a preconfigured setup with all dependencies |
8 | Docker Compose file provides example labels for the Traefik load balancer, | ||
9 | though any HTTP reverse proxy is compatible. | ||
10 | 18 | ||
11 | Example for running a PeerTube server locally: | 19 | PeerTube needs a PostgreSQL and a Redis instance to work correctly. If you want |
20 | to quickly set up a full environment, either for trying the service or in | ||
21 | production, you can use a `docker-compose` setup. | ||
12 | 22 | ||
13 | ```bash | 23 | ```bash |
14 | $ wget https://github.com/chocobozzz/PeerTube/raw/develop/support/docker/production/docker-compose.yml | 24 | $ git clone https://github.com/chocobozzz/PeerTube /tmp/peertube |
15 | $ sudo \ | 25 | $ cd /tmp/peertube/support/docker/production |
16 | PEERTUBE_HOSTNAME=peertube.lvh.me \ | ||
17 | PEERTUBE_ADMIN_EMAIL=test@example.com \ | ||
18 | PEERTUBE_TRANSCODING_ENABLED=true \ | ||
19 | docker-compose up app | ||
20 | ``` | 26 | ``` |
21 | 27 | ||
22 | (Get the initial root user password from the program output.) | 28 | Then tweak the `docker-compose.yml` file there according to your needs. Then |
29 | you can use the regular `up` command to set it up, with possible overrides of | ||
30 | the environment variables: | ||
23 | 31 | ||
24 | ## Production | 32 | ```bash |
33 | $ PEERTUBE_HOSTNAME=peertube.lvh.me \ | ||
34 | PEERTUBE_ADMIN_EMAIL=test@example.com \ | ||
35 | PEERTUBE_TRANSCODING_ENABLED=true \ | ||
36 | PEERTUBE_SIGNUP_ENABLED=true \ | ||
37 | PEERTUBE_SMTP_HOST=mail.lvh.me \ | ||
38 | PEERTUBE_SMTP_PORT=1025 \ | ||
39 | PEERTUBE_SMTP_FROM=noreply@peertube.lvh.me \ | ||
40 | docker-compose up | ||
41 | ``` | ||
42 | |||
43 | Other environment variables are used in | ||
44 | `support/docker/production/config/custom-environment-variables.yaml` and can be | ||
45 | intuited from usage. | ||
46 | |||
47 | For this example configuration, a reverse proxy is quite recommended. The | ||
48 | example Docker Compose file provides example labels for a Traefik load | ||
49 | balancer, although any HTTP reverse proxy will work fine. See the example | ||
50 | Nginx configuration `support/nginx/peertube` file to get an idea of | ||
51 | recommendations and requirements to run PeerTube the most efficiently. | ||
52 | |||
53 | **Important**: note that you'll get the initial `root` user password from the | ||
54 | program output, so check out your logs to find them. | ||
55 | |||
56 | ## Development | ||
25 | 57 | ||
26 | PR welcome! | 58 | The Docker image that's preconfigured in `support/docker/dev` contains all the |
59 | services embedded in one image, so as to work correctly on | ||
60 | [Janitor](https://janitor.technology). It is much not advised to use it in | ||
61 | production. | ||