diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:52:34 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 11:52:34 +0100 |
commit | 88108880bbdba473cfe36ecbebc1c3c4f972e102 (patch) | |
tree | b242efb3b4f0d7e49d88f2d1f2063b5b3b0489c0 /support/docker/janitor | |
parent | 53a94c7cfa8368da4cd248d65df8346905938f0c (diff) | |
parent | 9b712a2017e4ab3cf12cd6bd58278905520159d0 (diff) | |
download | PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.gz PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.tar.zst PeerTube-88108880bbdba473cfe36ecbebc1c3c4f972e102.zip |
Merge branch 'develop' into pr/1217
Diffstat (limited to 'support/docker/janitor')
-rw-r--r-- | support/docker/janitor/Dockerfile | 32 | ||||
-rw-r--r-- | support/docker/janitor/create_user.sql | 3 | ||||
-rw-r--r-- | support/docker/janitor/janitor.json | 42 | ||||
-rw-r--r-- | support/docker/janitor/supervisord.conf | 3 |
4 files changed, 80 insertions, 0 deletions
diff --git a/support/docker/janitor/Dockerfile b/support/docker/janitor/Dockerfile new file mode 100644 index 000000000..2b4f2b215 --- /dev/null +++ b/support/docker/janitor/Dockerfile | |||
@@ -0,0 +1,32 @@ | |||
1 | FROM janitortechnology/ubuntu-dev | ||
2 | |||
3 | # Install PeerTube's dependencies. | ||
4 | # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies | ||
5 | RUN sudo apt-get update -q && sudo apt-get install -qy \ | ||
6 | ffmpeg \ | ||
7 | postgresql \ | ||
8 | openssl | ||
9 | |||
10 | # Download PeerTube's source code. | ||
11 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | ||
12 | WORKDIR /home/user/PeerTube | ||
13 | |||
14 | # Configure the IDEs to use Janitor's source directory as workspace. | ||
15 | ENV WORKSPACE /home/user/PeerTube/ | ||
16 | |||
17 | # Install dependencies. | ||
18 | RUN yarn install --pure-lockfile | ||
19 | |||
20 | # Configure Janitor for PeerTube. | ||
21 | COPY --chown=user:user janitor.json /home/user/ | ||
22 | |||
23 | # Configure and build PeerTube. | ||
24 | COPY create_user.sql /tmp/ | ||
25 | RUN sudo service postgresql start \ | ||
26 | && sudo -u postgres psql --file=/tmp/create_user.sql \ | ||
27 | && npm run build | ||
28 | |||
29 | COPY --chown=user:user supervisord.conf /tmp/supervisord-extra.conf | ||
30 | RUN cat /tmp/supervisord-extra.conf | sudo tee -a /etc/supervisord.conf | ||
31 | |||
32 | EXPOSE 3000 9000 | ||
diff --git a/support/docker/janitor/create_user.sql b/support/docker/janitor/create_user.sql new file mode 100644 index 000000000..c2fbcf27e --- /dev/null +++ b/support/docker/janitor/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/janitor/janitor.json b/support/docker/janitor/janitor.json new file mode 100644 index 000000000..5acdf3060 --- /dev/null +++ b/support/docker/janitor/janitor.json | |||
@@ -0,0 +1,42 @@ | |||
1 | { | ||
2 | "name": "PeerTube", | ||
3 | "description": "Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent and Angular.", | ||
4 | "icon": "https://janitor.technology/img/peertube.svg", | ||
5 | "docker": { | ||
6 | "image": "chocobozzz/peertube-dev" | ||
7 | }, | ||
8 | "ports": { | ||
9 | "22": { | ||
10 | "label": "SSH", | ||
11 | "proxy": "none" | ||
12 | }, | ||
13 | "3000": { | ||
14 | "label": "PeerTube web app", | ||
15 | "proxy": "https", | ||
16 | "preview": true | ||
17 | }, | ||
18 | "8088": { | ||
19 | "label": "VNC", | ||
20 | "proxy": "https" | ||
21 | }, | ||
22 | "8089": { | ||
23 | "label": "Cloud9", | ||
24 | "proxy": "https" | ||
25 | }, | ||
26 | "8090": { | ||
27 | "label": "Theia", | ||
28 | "proxy": "https" | ||
29 | }, | ||
30 | "9000": { | ||
31 | "label": "PeerTube API", | ||
32 | "proxy": "https" | ||
33 | } | ||
34 | }, | ||
35 | "scripts": { | ||
36 | "Start PeerTube": "npm run dev", | ||
37 | "Build PeerTube": "npm run build", | ||
38 | "Run tests": "npm test", | ||
39 | "Update source code": "git pull --rebase origin", | ||
40 | "Send to code review": "hub pull-request" | ||
41 | } | ||
42 | } | ||
diff --git a/support/docker/janitor/supervisord.conf b/support/docker/janitor/supervisord.conf new file mode 100644 index 000000000..b2e1682df --- /dev/null +++ b/support/docker/janitor/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 | ||