Browse Source

publish additional guidance for using this fork as an always-on service with docker-compose

Ken Bingham 6 years ago
parent
commit
9e27a58be6
3 changed files with 14 additions and 13 deletions
  1. 3 1
      Dockerfile
  2. 10 11
      INSTALL.md
  3. 1 1
      docker-compose.yml

+ 3 - 1
Dockerfile View File

30
 
30
 
31
 # Clone repo
31
 # Clone repo
32
 RUN : breakcache0
32
 RUN : breakcache0
33
-RUN git clone https://github.com/qrkourier/audiogram.git
33
+RUN git clone https://github.com/nypublicradio/audiogram.git
34
 WORKDIR /home/audiogram/audiogram
34
 WORKDIR /home/audiogram/audiogram
35
 #VOLUME /home/audiogram/audiogram
35
 #VOLUME /home/audiogram/audiogram
36
 
36
 
37
 # Install dependencies
37
 # Install dependencies
38
 RUN npm install
38
 RUN npm install
39
+
40
+# listen for requests
39
 CMD npm start
41
 CMD npm start

+ 10 - 11
INSTALL.md View File

111
 
111
 
112
 If you use [Docker](https://www.docker.com/products/docker), you can build an image from the included Dockerfile.
112
 If you use [Docker](https://www.docker.com/products/docker), you can build an image from the included Dockerfile.
113
 
113
 
114
-In addition to installing Docker, you'll need to install Git.  You can do this by installing [GitHub Desktop](https://desktop.github.com/).
114
+In addition to installing Docker, you may need to install Git.  You can do this by installing [GitHub Desktop](https://desktop.github.com/).
115
 
115
 
116
-You can clone the repo and build an image, or build it directly from the repo:
116
+Some operating systems e.g. Ubuntu provide a permission group "docker. You can join this group like `sudo usermod -aG docker $USER` and then it's not necessary to prepend every docker command with `sudo`. It's necessary to log out of the desktop session for this permission group change to take effect.
117
 
117
 
118
-```sh
119
-git clone https://github.com/nypublicradio/audiogram.git
120
-cd audiogram
121
-docker build -t audiogram .
122
-```
123
-
124
-or
118
+You can clone the repo and build an image, or build it directly from the repo:
125
 
119
 
120
+An ephemeral container image can be built and run like
126
 ```sh
121
 ```sh
127
 docker build -t audiogram https://github.com/nypublicradio/audiogram.git
122
 docker build -t audiogram https://github.com/nypublicradio/audiogram.git
123
+docker run -p 8888:8888 audiogram
128
 ```
124
 ```
129
 
125
 
130
-Now you can run Audiogram in a container using that image:
126
+or you can clone the source code to obtain the service file for docker compose and run these commands once in order to always have the container running in the background and available at http://localhost:8888.
131
 
127
 
132
 ```sh
128
 ```sh
133
-docker run -p 8888:8888 -t -i audiogram
129
+git clone https://github.com/nypublicradio/audiogram.git
130
+cd audiogram
131
+docker build -t audiogram .
132
+docker-compose up
134
 ```
133
 ```
135
 
134
 
136
 ## AWS installation
135
 ## AWS installation

+ 1 - 1
docker-compose.yml View File

1
 version: '2'
1
 version: '2'
2
 services:
2
 services:
3
   audiogram:
3
   audiogram:
4
-    image: qrkourier/audiogram:latest
4
+    image: audiogram
5
     ports:
5
     ports:
6
         - 8888:8888
6
         - 8888:8888
7
     restart: always
7
     restart: always