aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker
diff options
context:
space:
mode:
authorBenjamin Bouvier <public@benj.me>2018-01-16 23:37:15 +0100
committerChocobozzz <me@florianbigard.com>2018-01-25 11:13:07 +0100
commita585af352c8f78f62a964f81192516ee6a2556e1 (patch)
treed2f6c553924cb6a2d110497343b0851c82ad03ac /support/docker
parent15dbc134bd92b3b9953d676b6c6bda2d41e4945b (diff)
downloadPeerTube-a585af352c8f78f62a964f81192516ee6a2556e1.tar.gz
PeerTube-a585af352c8f78f62a964f81192516ee6a2556e1.tar.zst
PeerTube-a585af352c8f78f62a964f81192516ee6a2556e1.zip
Fixes #205: Fix Janitor configuration;
Diffstat (limited to 'support/docker')
-rw-r--r--support/docker/dev/Dockerfile13
-rw-r--r--support/docker/dev/create_user.sql3
-rw-r--r--support/docker/dev/janitor.json12
-rw-r--r--support/docker/dev/supervisord.conf3
4 files changed, 25 insertions, 6 deletions
diff --git a/support/docker/dev/Dockerfile b/support/docker/dev/Dockerfile
index ccad92f6b..8a99496a6 100644
--- a/support/docker/dev/Dockerfile
+++ b/support/docker/dev/Dockerfile
@@ -15,10 +15,19 @@ WORKDIR /home/user/PeerTube
15# Configure Cloud9 IDE to use PeerTube's source directory as workspace (-w). 15# Configure Cloud9 IDE to use PeerTube's source directory as workspace (-w).
16RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf 16RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf
17 17
18# Install dependencies.
19RUN yarn install --pure-lockfile
20
18# Configure Janitor for PeerTube. 21# Configure Janitor for PeerTube.
19ADD janitor.json /home/user/ 22ADD janitor.json /home/user/
20RUN sudo chown user:user /home/user/janitor.json 23RUN sudo chown user:user /home/user/janitor.json
21 24
22# Configure and build PeerTube. 25# Configure and build PeerTube.
23RUN yarn install \ 26ADD create_user.sql /tmp/
24 && npm run build 27RUN sudo service postgresql start && \
28 sudo -u postgres psql --file=/tmp/create_user.sql
29
30ADD supervisord.conf /tmp/supervisord-extra.conf
31RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf
32
33EXPOSE 3000 9000
diff --git a/support/docker/dev/create_user.sql b/support/docker/dev/create_user.sql
new file mode 100644
index 000000000..c2fbcf27e
--- /dev/null
+++ b/support/docker/dev/create_user.sql
@@ -0,0 +1,3 @@
1create database peertube_dev;
2create user peertube password 'peertube';
3grant all privileges on database peertube_dev to peertube;
diff --git a/support/docker/dev/janitor.json b/support/docker/dev/janitor.json
index 6452f56c8..4051e8bcd 100644
--- a/support/docker/dev/janitor.json
+++ b/support/docker/dev/janitor.json
@@ -10,6 +10,11 @@
10 "label": "SSH", 10 "label": "SSH",
11 "proxy": "none" 11 "proxy": "none"
12 }, 12 },
13 "3000": {
14 "label": "PeerTube web app",
15 "proxy": "https",
16 "preview": true
17 },
13 "8088": { 18 "8088": {
14 "label": "VNC", 19 "label": "VNC",
15 "proxy": "https" 20 "proxy": "https"
@@ -19,13 +24,12 @@
19 "proxy": "https" 24 "proxy": "https"
20 }, 25 },
21 "9000": { 26 "9000": {
22 "label": "PeerTube", 27 "label": "PeerTube API",
23 "proxy": "https", 28 "proxy": "https"
24 "preview": true
25 } 29 }
26 }, 30 },
27 "scripts": { 31 "scripts": {
28 "Start PeerTube": "npm start", 32 "Start PeerTube": "npm run dev",
29 "Build PeerTube": "npm run build", 33 "Build PeerTube": "npm run build",
30 "Run tests": "npm test", 34 "Run tests": "npm test",
31 "Update source code": "git pull --rebase origin", 35 "Update source code": "git pull --rebase origin",
diff --git a/support/docker/dev/supervisord.conf b/support/docker/dev/supervisord.conf
new file mode 100644
index 000000000..b2e1682df
--- /dev/null
+++ b/support/docker/dev/supervisord.conf
@@ -0,0 +1,3 @@
1[program:postgresql]
2user = user
3command = sudo -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql/9.5/main -c config_file=/etc/postgresql/9.5/main/postgresql.conf