]>
Commit | Line | Data |
---|---|---|
ee7c25c7 | 1 | FROM ubuntu:bionic |
2 | ||
3 | # Avoid tzdata interactive dialog | |
4 | ENV DEBIAN_FRONTEND=noninteractive | |
492fd281 JK |
5 | |
6 | # Install PeerTube's dependencies. | |
7 | # Packages are from https://github.com/Chocobozzz/PeerTube#dependencies | |
ee7c25c7 | 8 | RUN apt-get update -q && apt-get install -qy \ |
9 | curl \ | |
10 | nano \ | |
492fd281 JK |
11 | ffmpeg \ |
12 | postgresql \ | |
ee7c25c7 | 13 | postgresql-contrib \ |
14 | openssl \ | |
15 | g++ \ | |
16 | make \ | |
17 | redis-server \ | |
18 | git \ | |
19 | gnupg | |
20 | ||
21 | # Install NodeJS 8.x | |
22 | RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \ | |
23 | apt-get install -y nodejs | |
24 | ||
25 | # Install Yarn | |
26 | RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
27 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ | |
28 | apt-get update && apt-get install yarn | |
492fd281 JK |
29 | |
30 | # Download PeerTube's source code. | |
31 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | |
32 | WORKDIR /home/user/PeerTube | |
33 | ||
a585af35 BB |
34 | # Install dependencies. |
35 | RUN yarn install --pure-lockfile | |
36 | ||
ee7c25c7 | 37 | # Configure and run PeerTube. |
38 | COPY setup_postgres.sql /tmp/ | |
39 | RUN service postgresql start \ | |
40 | && su postgres -c "psql --file=/tmp/setup_postgres.sql" | |
b270ad07 | 41 | |
ee7c25c7 | 42 | # Expose PeerTube sources as a volume |
43 | VOLUME /home/user/PeerTube | |
a585af35 BB |
44 | |
45 | EXPOSE 3000 9000 | |
ee7c25c7 | 46 | |
47 | # Start PostgreSQL and Redis | |
48 | CMD service postgresql start && redis-server |