Selaa lähdekoodia

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

Ken Bingham 6 vuotta sitten
vanhempi
commit
9e27a58be6
3 muutettua tiedostoa jossa 14 lisäystä ja 13 poistoa
  1. 3 1
      Dockerfile
  2. 10 11
      INSTALL.md
  3. 1 1
      docker-compose.yml

+ 3 - 1
Dockerfile Näytä tiedosto

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

+ 10 - 11
INSTALL.md Näytä tiedosto

@@ -111,26 +111,25 @@ Installing these dependencies on Windows is an uphill battle.  If you're running
111 111
 
112 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 121
 ```sh
127 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 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 135
 ## AWS installation

+ 1 - 1
docker-compose.yml Näytä tiedosto

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