diff options
author | Benjamin Bouvier <public@benj.me> | 2018-01-16 23:37:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-25 11:13:07 +0100 |
commit | a585af352c8f78f62a964f81192516ee6a2556e1 (patch) | |
tree | d2f6c553924cb6a2d110497343b0851c82ad03ac /support/docker | |
parent | 15dbc134bd92b3b9953d676b6c6bda2d41e4945b (diff) | |
download | PeerTube-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/Dockerfile | 13 | ||||
-rw-r--r-- | support/docker/dev/create_user.sql | 3 | ||||
-rw-r--r-- | support/docker/dev/janitor.json | 12 | ||||
-rw-r--r-- | support/docker/dev/supervisord.conf | 3 |
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). |
16 | RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf | 16 | RUN sudo sed -i "s/-w \/home\/user/-w \/home\/user\/PeerTube/" /etc/supervisord.conf |
17 | 17 | ||
18 | # Install dependencies. | ||
19 | RUN yarn install --pure-lockfile | ||
20 | |||
18 | # Configure Janitor for PeerTube. | 21 | # Configure Janitor for PeerTube. |
19 | ADD janitor.json /home/user/ | 22 | ADD janitor.json /home/user/ |
20 | RUN sudo chown user:user /home/user/janitor.json | 23 | RUN sudo chown user:user /home/user/janitor.json |
21 | 24 | ||
22 | # Configure and build PeerTube. | 25 | # Configure and build PeerTube. |
23 | RUN yarn install \ | 26 | ADD create_user.sql /tmp/ |
24 | && npm run build | 27 | RUN sudo service postgresql start && \ |
28 | sudo -u postgres psql --file=/tmp/create_user.sql | ||
29 | |||
30 | ADD supervisord.conf /tmp/supervisord-extra.conf | ||
31 | RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf | ||
32 | |||
33 | EXPOSE 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 @@ | |||
1 | create database peertube_dev; | ||
2 | create user peertube password 'peertube'; | ||
3 | grant 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] | ||
2 | user = user | ||
3 | command = 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 | ||