]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/doc/docker.md
fix docker-compose extension typo
[github/Chocobozzz/PeerTube.git] / support / doc / docker.md
CommitLineData
4df6a1b8
C
1# Docker guide
2
ef48a0d5
BB
3You 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.
4df6a1b8 6
ef48a0d5
BB
7## Production
8
b44a9630 9### Install
4df6a1b8 10
ef48a0d5
BB
11PeerTube needs a PostgreSQL and a Redis instance to work correctly. If you want
12to quickly set up a full environment, either for trying the service or in
13production, you can use a `docker-compose` setup.
4df6a1b8 14
f83e339b 15```shell
b44a9630
C
16$ cd /your/peertube/directory
17$ mkdir ./docker-volume && mkdir ./docker-volume/traefik
18$ curl "https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/config/traefik.toml" > ./docker-volume/traefik/traefik.toml
19$ touch ./docker-volume/traefik/acme.json && chmod 600 ./docker-volume/traefik/acme.json
f83e339b 20$ curl -s "https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/docker-compose.yml" -o docker-compose.yml "https://raw.githubusercontent.com/Chocobozzz/PeerTube/master/support/docker/production/.env" -o .env
b44a9630
C
21```
22
23Update the reverse proxy configuration:
24
f83e339b 25```shell
b44a9630
C
26$ vim ./docker-volume/traefik/traefik.toml
27```
28
29Tweak the `docker-compose.yml` file there according to your needs:
4df6a1b8 30
f83e339b 31```shell
52be3076 32$ vim ./docker-compose.yml
b44a9630
C
33```
34
f83e339b 35Then tweak the `.env` file to change the enviromnent variables:
4df6a1b8 36
f83e339b
FP
37```shell
38$ vim ./.env
ef48a0d5
BB
39```
40
41Other environment variables are used in
42`support/docker/production/config/custom-environment-variables.yaml` and can be
43intuited from usage.
44
f83e339b
FP
45You can use the regular `up` command to set it up:
46
47```shell
48$ docker-compose up
49```
50
ef48a0d5
BB
51**Important**: note that you'll get the initial `root` user password from the
52program output, so check out your logs to find them.
53
b44a9630
C
54### Upgrade
55
56Pull the latest images and rerun PeerTube:
57
f83e339b 58```shell
9007daff
C
59$ cd /your/peertube/directory
60$ docker-compose down
b44a9630 61$ docker-compose pull
f83e339b 62$ docker-compose up -d
b44a9630
C
63```
64
65
66## Build your own Docker image
67
f83e339b 68```shell
b44a9630
C
69$ git clone https://github.com/chocobozzz/PeerTube /tmp/peertube
70$ cd /tmp/peertube
71$ docker build . -f ./support/docker/production/Dockerfile.stretch
72```
73
ef48a0d5 74## Development
4df6a1b8 75
b44a9630 76We don't have a Docker image for development. See [the CONTRIBUTING guide](https://github.com/Chocobozzz/PeerTube/blob/develop/.github/CONTRIBUTING.md#develop)
f83e339b 77for more information on how you can hack PeerTube!