diff options
author | kaiyou <pierre@jaury.eu> | 2018-01-29 08:52:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-29 08:52:20 +0100 |
commit | e8395f027b6c3e3f757c740e35b20e76c51b03bd (patch) | |
tree | ee0e761357b7407b6992600342306669de880689 /support/docker/production/config | |
parent | 8dfd8fd7ca376e7898c912bb985a7a4a997cd966 (diff) | |
download | PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.tar.gz PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.tar.zst PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.zip |
Add production Alpine and Debian Stretch Docker images (#225)
* First pass at a (swarm-compatible) docker image
Uses an existing traefik server as a https reverse proxy.
* Add example config for a Docker swarm deployment
* Point to traefik config for docker compose setup
* Clarify that traefik is needed for the example config
* Use node:8-stretch base image and don't install yarn
(The base image already contains yarn.)
* Initial commit for an Alpine Docker image
* Fix docker volume path
* Merge #213 and #225 and move files around
* Remove unnecessary dependencies from the alpine build
* Update Dockerfiles to match install path, config path, etc.
* Update the configuration in the example compose file
* Update the configuration in the example swarm file
* Remove the declared networks and volumes from the compose example, which are not strictly required
* Update attachment path in the documentation
* Display traefik as a suggestion and not a required dependency
* Update the Docker ignored files
* Fix typos reported in #225
* Move production Dockerfiles to a production directory
* Add the redis configuration settings
* Add Docker files to the dockerignore
* Make the signup limit configurable
Diffstat (limited to 'support/docker/production/config')
-rw-r--r-- | support/docker/production/config/custom-environment-variables.yaml | 40 | ||||
-rw-r--r-- | support/docker/production/config/production.yaml | 64 |
2 files changed, 104 insertions, 0 deletions
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml new file mode 100644 index 000000000..5226e1742 --- /dev/null +++ b/support/docker/production/config/custom-environment-variables.yaml | |||
@@ -0,0 +1,40 @@ | |||
1 | webserver: | ||
2 | hostname: "PEERTUBE_HOSTNAME" | ||
3 | port: | ||
4 | __name: "PEERTUBE_PORT" | ||
5 | __format: "json" | ||
6 | https: | ||
7 | __name: "PEERTUBE_HTTPS" | ||
8 | __format: "json" | ||
9 | |||
10 | database: | ||
11 | hostname: "PEERTUBE_DB_HOSTNAME" | ||
12 | port: | ||
13 | __name: "PEERTUBE_DB_PORT" | ||
14 | __format: "json" | ||
15 | suffix: "PEERTUBE_DB_SUFFIX" | ||
16 | username: "PEERTUBE_DB_USERNAME" | ||
17 | password: "PEERTUBE_DB_PASSWORD" | ||
18 | |||
19 | redis: | ||
20 | hostname: "PEERTUBE_REDIS_HOSTNAME" | ||
21 | port: | ||
22 | __name: "PEERTUBE_REDIS_PORT" | ||
23 | __format: "json" | ||
24 | auth: "PEERTUBE_REDIS_AUTH" | ||
25 | |||
26 | admin: | ||
27 | email: "PEERTUBE_ADMIN_EMAIL" | ||
28 | |||
29 | signup: | ||
30 | enabled: | ||
31 | __name: "PEERTUBE_SIGNUP_ENABLED" | ||
32 | __format: "json" | ||
33 | limit: | ||
34 | __name: "PEETUBE_SIGNUP_LIMIT" | ||
35 | __format: "json" | ||
36 | |||
37 | transcoding: | ||
38 | enabled: | ||
39 | __name: "PEERTUBE_TRANSCODING_ENABLED" | ||
40 | __format: "json" | ||
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml new file mode 100644 index 000000000..4666ea2ed --- /dev/null +++ b/support/docker/production/config/production.yaml | |||
@@ -0,0 +1,64 @@ | |||
1 | listen: | ||
2 | port: 9000 | ||
3 | |||
4 | # Correspond to your reverse proxy "listen" configuration | ||
5 | webserver: | ||
6 | https: true | ||
7 | hostname: undefined | ||
8 | port: 443 | ||
9 | |||
10 | # Your database name will be "peertube"+database.suffix | ||
11 | database: | ||
12 | hostname: 'db' | ||
13 | port: 5432 | ||
14 | suffix: '' | ||
15 | username: 'postgres' | ||
16 | password: 'postgres' | ||
17 | |||
18 | # Redis server for short time storage | ||
19 | redis: | ||
20 | hostname: 'redis' | ||
21 | port: 6379 | ||
22 | auth: null | ||
23 | |||
24 | # From the project root directory | ||
25 | storage: | ||
26 | avatars: '../data/avatars/' | ||
27 | certs: '../data/certs/' | ||
28 | videos: '../data/videos/' | ||
29 | logs: '../data/logs/' | ||
30 | previews: '../data/previews/' | ||
31 | thumbnails: '../data/thumbnails/' | ||
32 | torrents: '../data/torrents/' | ||
33 | cache: '../data/cache/' | ||
34 | |||
35 | log: | ||
36 | level: 'info' # debug/info/warning/error | ||
37 | |||
38 | cache: | ||
39 | previews: | ||
40 | size: 100 # Max number of previews you want to cache | ||
41 | |||
42 | admin: | ||
43 | email: undefined | ||
44 | |||
45 | signup: | ||
46 | enabled: false | ||
47 | limit: -1 | ||
48 | |||
49 | user: | ||
50 | # Default value of maximum video BYTES the user can upload (does not take into account transcoded files). | ||
51 | # -1 == unlimited | ||
52 | video_quota: -1 | ||
53 | |||
54 | # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag | ||
55 | # Uses a lot of CPU! | ||
56 | transcoding: | ||
57 | enabled: false | ||
58 | threads: 2 | ||
59 | resolutions: # Only created if the original video has a higher resolution | ||
60 | 240p: true | ||
61 | 360p: true | ||
62 | 480p: true | ||
63 | 720p: true | ||
64 | 1080p: true | ||