Make wide dockerfile better

This commit is contained in:
Christine Dodrill 2015-07-19 21:06:43 -07:00
parent 7ef40681e2
commit a807d81d51
4 changed files with 55 additions and 0 deletions

View File

@ -9,6 +9,7 @@ RUN adduser wide \
USER wide USER wide
ADD ./wide-1.3.0-linux-amd64.tar.gz /wide/app ADD ./wide-1.3.0-linux-amd64.tar.gz /wide/app
ADD ./style.css /wide/app/static/user/admin/style.css ADD ./style.css /wide/app/static/user/admin/style.css
ADD ./admin.json /wide/admin.json
USER root USER root
ADD ./start.sh / ADD ./start.sh /

15
net/wide/README.md Normal file
View File

@ -0,0 +1,15 @@
USAGE
=====
```
docker build -t xena/wide . &&\
docker run \
-e VIRTUAL_HOST=wide.hyperadmin.yochat.biz \
-v /data/sdb/wide/data:/wide/data \
-v /data/sdb/wide/users:/wide/app/conf/users \
xena/wide
```
Then navigate to http://wide.hyperadmin.yochat.biz.
This may not work reliably outside of hyperadmin range.

33
net/wide/admin.json Normal file
View File

@ -0,0 +1,33 @@
{
"Name": "admin",
"Password": "d1bfca21893c908e64fabda01d71294b1ccdcaa7",
"Salt": "dnoyeb",
"Email": "",
"Gravatar": "d41d8cd98f00b204e9800998ecf8427e",
"Workspace": "/wide/data/users/admin",
"Locale": "en_US",
"GoFormat": "gofmt",
"FontFamily": "Helvetica",
"FontSize": "13px",
"Theme": "default",
"Keymap": "wide",
"Created": 1414080000000000000,
"Updated": 1414080000000000000,
"Lived": 1414080000000000000,
"Editor": {
"FontFamily": "Consolas, 'Courier New', monospace",
"FontSize": "13px",
"LineHeight": "17px",
"Theme": "wide",
"TabSize": "4"
},
"LatestSessionContent": {
"FileTree": [],
"Files": [],
"CurrentFile": "",
"FileTreeLayout": null,
"EditorLayout": null,
"OutlineLayout": null,
"BottomLayout": null
}
}

View File

@ -1,6 +1,12 @@
#!/bin/bash #!/bin/bash
set -x
set -e
chown -R 3434:3434 /wide/app /wide/data chown -R 3434:3434 /wide/app /wide/data
chmod -R a+rwx /wide/data chmod -R a+rwx /wide/data
mkdir -p /wide/app/conf/users ||:
cp /wide/admin.json /wide/app/conf/users/admin.json
su wide '/run.sh' su wide '/run.sh'