diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-23 11:22:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-23 11:22:26 +0100 |
commit | 95540ed23a2e6ae6d48739f211aa24df57278413 (patch) | |
tree | df45ecb921edc8a00747799912f086d1b911a117 /support/docker | |
parent | a216c6233d46689f73a7c542e6170555b7f287b6 (diff) | |
download | PeerTube-95540ed23a2e6ae6d48739f211aa24df57278413.tar.gz PeerTube-95540ed23a2e6ae6d48739f211aa24df57278413.tar.zst PeerTube-95540ed23a2e6ae6d48739f211aa24df57278413.zip |
Prepare building docker files on docker hub
Diffstat (limited to 'support/docker')
-rw-r--r-- | support/docker/production/Dockerfile.alpine | 6 | ||||
-rw-r--r-- | support/docker/production/Dockerfile.stretch | 6 | ||||
-rw-r--r-- | support/docker/production/config/production.yaml | 50 | ||||
-rw-r--r-- | support/docker/production/docker-compose.yml | 6 |
4 files changed, 10 insertions, 58 deletions
diff --git a/support/docker/production/Dockerfile.alpine b/support/docker/production/Dockerfile.alpine index 939b2d23b..8ce0bb98b 100644 --- a/support/docker/production/Dockerfile.alpine +++ b/support/docker/production/Dockerfile.alpine | |||
@@ -4,10 +4,9 @@ FROM node:8-alpine | |||
4 | RUN apk add --no-cache ffmpeg openssl bash make g++ git \ | 4 | RUN apk add --no-cache ffmpeg openssl bash make g++ git \ |
5 | && apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev | 5 | && apk add --no-cache --repository https://dl-3.alpinelinux.org/alpine/edge/testing/ vips-dev fftw-dev |
6 | 6 | ||
7 | # Install the application | 7 | RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app |
8 | WORKDIR /app | ||
9 | 8 | ||
10 | COPY . ./ | 9 | WORKDIR /app |
11 | RUN bash -c 'yarn install --pure-lockfile && npm run build' | 10 | RUN bash -c 'yarn install --pure-lockfile && npm run build' |
12 | 11 | ||
13 | # Configure the application | 12 | # Configure the application |
@@ -15,6 +14,7 @@ RUN addgroup -g 991 peertube \ | |||
15 | && adduser -D -u 991 -G peertube -h /data peertube | 14 | && adduser -D -u 991 -G peertube -h /data peertube |
16 | USER peertube | 15 | USER peertube |
17 | 16 | ||
17 | RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml | ||
18 | ENV NODE_ENV production | 18 | ENV NODE_ENV production |
19 | ENV NODE_CONFIG_DIR /app/support/docker/production/config/ | 19 | ENV NODE_CONFIG_DIR /app/support/docker/production/config/ |
20 | 20 | ||
diff --git a/support/docker/production/Dockerfile.stretch b/support/docker/production/Dockerfile.stretch index c739247a6..c616194e6 100644 --- a/support/docker/production/Dockerfile.stretch +++ b/support/docker/production/Dockerfile.stretch | |||
@@ -5,10 +5,9 @@ RUN apt-get update \ | |||
5 | && apt-get -y install ffmpeg \ | 5 | && apt-get -y install ffmpeg \ |
6 | && rm /var/lib/apt/lists/* -fR | 6 | && rm /var/lib/apt/lists/* -fR |
7 | 7 | ||
8 | # Install the application | 8 | RUN git clone -b master https://github.com/Chocobozzz/PeerTube /app |
9 | WORKDIR /app | ||
10 | 9 | ||
11 | COPY . ./ | 10 | WORKDIR /app |
12 | RUN yarn install --pure-lockfile && npm run build | 11 | RUN yarn install --pure-lockfile && npm run build |
13 | 12 | ||
14 | # Configure the application | 13 | # Configure the application |
@@ -16,6 +15,7 @@ RUN groupadd -g 991 peertube \ | |||
16 | && useradd -u 991 -g peertube -d /data -m peertube | 15 | && useradd -u 991 -g peertube -d /data -m peertube |
17 | USER peertube | 16 | USER peertube |
18 | 17 | ||
18 | RUN cp /app/config/default.yaml /app/support/docker/production/config/default.yaml | ||
19 | ENV NODE_ENV production | 19 | ENV NODE_ENV production |
20 | ENV NODE_CONFIG_DIR /app/support/docker/production/config | 20 | ENV NODE_CONFIG_DIR /app/support/docker/production/config |
21 | 21 | ||
diff --git a/support/docker/production/config/production.yaml b/support/docker/production/config/production.yaml index fdcbeb5a0..41272ba26 100644 --- a/support/docker/production/config/production.yaml +++ b/support/docker/production/config/production.yaml | |||
@@ -21,21 +21,9 @@ redis: | |||
21 | port: 6379 | 21 | port: 6379 |
22 | auth: null | 22 | auth: null |
23 | 23 | ||
24 | # SMTP server to send emails | ||
25 | smtp: | ||
26 | hostname: null | ||
27 | port: 465 | ||
28 | username: null | ||
29 | password: null | ||
30 | tls: true | ||
31 | disable_starttls: false | ||
32 | ca_file: null # Used for self signed certificates | ||
33 | from_address: 'admin@example.com' | ||
34 | |||
35 | # From the project root directory | 24 | # From the project root directory |
36 | storage: | 25 | storage: |
37 | avatars: '../data/avatars/' | 26 | avatars: '../data/avatars/' |
38 | certs: '../data/certs/' | ||
39 | videos: '../data/videos/' | 27 | videos: '../data/videos/' |
40 | logs: '../data/logs/' | 28 | logs: '../data/logs/' |
41 | previews: '../data/previews/' | 29 | previews: '../data/previews/' |
@@ -46,41 +34,5 @@ storage: | |||
46 | log: | 34 | log: |
47 | level: 'info' # debug/info/warning/error | 35 | level: 'info' # debug/info/warning/error |
48 | 36 | ||
49 | cache: | ||
50 | previews: | ||
51 | size: 100 # Max number of previews you want to cache | ||
52 | |||
53 | admin: | 37 | admin: |
54 | email: undefined | 38 | email: null |
55 | |||
56 | signup: | ||
57 | enabled: false | ||
58 | limit: -1 | ||
59 | |||
60 | user: | ||
61 | # Default value of maximum video BYTES the user can upload (does not take into account transcoded files). | ||
62 | # -1 == unlimited | ||
63 | video_quota: -1 | ||
64 | |||
65 | # If enabled, the video will be transcoded to mp4 (x264) with "faststart" flag | ||
66 | # Uses a lot of CPU! | ||
67 | transcoding: | ||
68 | enabled: false | ||
69 | threads: 2 | ||
70 | resolutions: # Only created if the original video has a higher resolution | ||
71 | 240p: true | ||
72 | 360p: true | ||
73 | 480p: true | ||
74 | 720p: true | ||
75 | 1080p: true | ||
76 | |||
77 | # Instance settings | ||
78 | instance: | ||
79 | name: 'PeerTube' | ||
80 | short_description: 'PeerTube, a federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.' | ||
81 | description: '' # Support markdown | ||
82 | terms: '' # Support markdown | ||
83 | default_client_route: '/videos/trending' | ||
84 | customizations: | ||
85 | javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime | ||
86 | css: '' # Directly your CSS code (without <style> tags). Will be injected at runtime | ||
diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml index 9c6b6f6e3..d45b0b51a 100644 --- a/support/docker/production/docker-compose.yml +++ b/support/docker/production/docker-compose.yml | |||
@@ -4,8 +4,8 @@ services: | |||
4 | 4 | ||
5 | peertube: | 5 | peertube: |
6 | build: | 6 | build: |
7 | context: ../../../ | 7 | context: . |
8 | dockerfile: ./support/docker/production/Dockerfile.stretch | 8 | dockerfile: ./Dockerfile.stretch |
9 | image: peertube:stretch | 9 | image: peertube:stretch |
10 | environment: | 10 | environment: |
11 | PEERTUBE_HOSTNAME: my.domain.tld | 11 | PEERTUBE_HOSTNAME: my.domain.tld |
@@ -18,7 +18,7 @@ services: | |||
18 | PEERTUBE_SIGNUP_ENABLED: "true" | 18 | PEERTUBE_SIGNUP_ENABLED: "true" |
19 | PEERTUBE_TRANSCODING_ENABLED: "true" | 19 | PEERTUBE_TRANSCODING_ENABLED: "true" |
20 | PEERTUBE_REDIS_HOSTNAME: redis | 20 | PEERTUBE_REDIS_HOSTNAME: redis |
21 | PEERTUBE_SMTP_HOSTNAME: mail.domain.tld | 21 | PEERTUBE_SMTP_HOSTNAME: null |
22 | PEERTUBE_SMTP_PORT: 25 | 22 | PEERTUBE_SMTP_PORT: 25 |
23 | PEERTUBE_SMTP_FROM: noreply@peertube.domain.tld | 23 | PEERTUBE_SMTP_FROM: noreply@peertube.domain.tld |
24 | PEERTUBE_SMTP_TLS: "true" | 24 | PEERTUBE_SMTP_TLS: "true" |