Browse Source

Added Dockerfile + instructions

Noah 7 years ago
parent
commit
4d5784913d
3 changed files with 59 additions and 1 deletions
  1. 9 0
      .dockerignore
  2. 22 0
      Dockerfile
  3. 28 1
      INSTALL.md

+ 9 - 0
.dockerignore View File

1
+.DS_Store
2
+node_modules/
3
+.env
4
+tmp/
5
+editor/js/*
6
+junk/
7
+media/
8
+*.log
9
+.jobs

+ 22 - 0
Dockerfile View File

1
+FROM ubuntu:16.04
2
+
3
+# Install dependencies
4
+RUN apt-get update --yes && apt-get upgrade --yes
5
+RUN apt-get install git nodejs npm \
6
+libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ \
7
+ffmpeg \
8
+libgroove-dev zlib1g-dev libpng-dev \
9
+redis-server --yes
10
+
11
+RUN ln -s `which nodejs` /usr/bin/node
12
+
13
+# Non-privileged user
14
+RUN useradd -m audiogram
15
+USER audiogram
16
+
17
+# Clone repo
18
+RUN git clone https://github.com/nypublicradio/audiogram.git
19
+WORKDIR /home/audiogram/audiogram
20
+
21
+# Install dependencies
22
+RUN npm install

+ 28 - 1
INSTALL.md View File

9
 
9
 
10
 If you're using a particularly fancy distributed setup you'll also need to install [Redis](http://redis.io/).
10
 If you're using a particularly fancy distributed setup you'll also need to install [Redis](http://redis.io/).
11
 
11
 
12
-Installation has been tested on Ubuntu 14.04 and 15.04. It has also been tested on various Mac OS X environments, with various degrees of Homebrew Hell involved.
12
+Installation has been tested on Ubuntu 14.04, 15.04, and 16.04. It has also been tested on various Mac OS X environments, with various degrees of Homebrew Hell involved.
13
 
13
 
14
 This would theoretically work on Windows, but it hasn't been tested.
14
 This would theoretically work on Windows, but it hasn't been tested.
15
 
15
 
16
+You can skip almost all of the installation if you use [Docker](#docker-installation).
17
+
16
 ## Ubuntu 14.04+ installation
18
 ## Ubuntu 14.04+ installation
17
 
19
 
18
 Note: if you're using something with very little memory, like a Digital Ocean micro droplet, it might cause an installation problem on the last step. See [Linux troubleshooting](INSTALL.md#linux-troubleshooting) below for how to fix it.
20
 Note: if you're using something with very little memory, like a Digital Ocean micro droplet, it might cause an installation problem on the last step. See [Linux troubleshooting](INSTALL.md#linux-troubleshooting) below for how to fix it.
107
 npm install
109
 npm install
108
 ```
110
 ```
109
 
111
 
112
+## Docker installation
113
+
114
+If you use [Docker](https://www.docker.com/products/docker), you can build an image from the included Dockerfile.
115
+
116
+
117
+
118
+You can clone the repo and build an image, or build it directly from the repo:
119
+
120
+```sh
121
+git clone https://github.com/nypublicradio/audiogram.git
122
+cd audiogram
123
+docker build -t audiogram .
124
+```
125
+
126
+or
127
+
128
+```sh
129
+docker build -t https://github.com/nypublicradio/audiogram.git
130
+
131
+Now you can run Audiogram in a container using that image:
132
+
133
+```sh
134
+docker run -p 8888:8888 -t -i audiogram
135
+```
136
+
110
 ## Mac troubleshooting
137
 ## Mac troubleshooting
111
 
138
 
112
 If things aren't working on a Mac, there are a few fixes you can try.
139
 If things aren't working on a Mac, there are a few fixes you can try.