-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·46 lines (37 loc) · 1.53 KB
/
start.sh
File metadata and controls
executable file
·46 lines (37 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#
# Simple script to re-start the files.vision.ai container, which has
# the name nginx-files as well as the generator container, which has
# the name nginx-files-generator.
#
# Copyright vision.ai, LLC 2015
cd `dirname $0`
#Stop our containers
docker stop nginx-files && docker rm -v nginx-files
docker stop nginx-files-http && docker rm -v nginx-files-http
#This will serve the /www directory using the fancyfiles.conf
#configuration file. Note that we are uxing the xdrum/nginx-extras
#server which has fancyindex pre-compiled.
docker run -d --name nginx-files \
-p 127.0.0.1:5000:80 \
-e VIRTUAL_HOST=files.vision.ai \
-v `pwd`/fancyfiles.conf:/etc/nginx/sites-enabled/default:ro \
-v `pwd`/fancy:/fancy:ro \
-v /www/vmx:/usr/share/nginx/html/vmx:ro \
-v /www/releases:/usr/share/nginx/html/releases:ro \
-v /www/images:/usr/share/nginx/html/images:ro \
xdrum/nginx-extras:latest
docker run -d --name nginx-files-http \
-p 80:80 \
-v `pwd`/fancyfiles.conf:/etc/nginx/sites-enabled/default:ro \
-v `pwd`/fancy:/fancy:ro \
-v /www/vmx:/usr/share/nginx/html/vmx:ro \
-v /www/releases:/usr/share/nginx/html/releases:ro \
-v /www/images:/usr/share/nginx/html/images:ro \
xdrum/nginx-extras:latest
docker stop nginx-files-generator && docker rm -v nginx-files-generator
#Run the generator script which will watch for new files
docker run -d --name nginx-files-generator \
-v /www:/www \
-v `pwd`/scripts:/root:ro \
ubuntu:latest /bin/sh -c "cd /root && ./looper.sh"