]>
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 \ |
4293e362 KP |
9 | curl \ |
10 | ffmpeg \ | |
11 | g++ \ | |
12 | git \ | |
13 | gnupg \ | |
14 | make \ | |
15 | nano \ | |
16 | openssl \ | |
17 | postgresql \ | |
18 | postgresql-contrib \ | |
19 | redis-server \ | |
20 | && curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | |
21 | && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
22 | && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
23 | && apt-get update \ | |
24 | && apt-get install -qy nodejs yarn \ | |
25 | && rm -rf /var/lib/apt/lists/* | |
492fd281 JK |
26 | |
27 | # Download PeerTube's source code. | |
28 | RUN git clone -b develop https://github.com/Chocobozzz/PeerTube /home/user/PeerTube | |
29 | WORKDIR /home/user/PeerTube | |
30 | ||
4293e362 | 31 | # Copy postgresql setup script |
ee7c25c7 | 32 | COPY setup_postgres.sql /tmp/ |
4293e362 KP |
33 | |
34 | # Install Node.js dependencies and setup PostgreSQL | |
35 | RUN yarn install --pure-lockfile \ | |
36 | && service postgresql start \ | |
37 | && su postgres -c "psql --file=/tmp/setup_postgres.sql" | |
b270ad07 | 38 | |
ee7c25c7 | 39 | # Expose PeerTube sources as a volume |
40 | VOLUME /home/user/PeerTube | |
a585af35 | 41 | |
4293e362 | 42 | # Expose API and frontend |
a585af35 | 43 | EXPOSE 3000 9000 |
ee7c25c7 | 44 | |
45 | # Start PostgreSQL and Redis | |
4293e362 | 46 | CMD ["service postgresql start && redis-server"] |