Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Themes on Windows with Docker #39

Closed
mobiuscoffee opened this issue Aug 13, 2016 · 3 comments
Closed

Themes on Windows with Docker #39

mobiuscoffee opened this issue Aug 13, 2016 · 3 comments

Comments

@mobiuscoffee
Copy link

I ran into a problem while trying to get audiogram to work on my Windows machine. I'm not a programmer, but it's easy enough to follow the steps laid out here.

However, I ran into a problem when trying to create a custom theme for audiogram. I edited the file and put in the correct sized background files, but when I started up audiogram the themes weren't there. I couldn't select them and only the defaults were present.

It feels like the themes aren't being copied into the container, and through some testing that seems to be the case, but I have no idea how to fix that.

@mobiuscoffee
Copy link
Author

mobiuscoffee commented Aug 14, 2016

It's pretty clear this is more a docker problem than a audiogram problem, but I think it's something that a lot of people could potentially have trouble with.

I've found a workaround that solves the problem, but is pretty sloppy.

I figured out I can make changes to the local theme files and then copy them over to the container with a Docker Quickstart Terminal.

docker cp c:/Users/<Name>/audiogram/settings/themes.json <container>:/home/audiogram/audiogram/settings/themes.json

The same thing can be done with background images.

docker cp c:/Users/<Name>/audiogram/settings/backgrounds/<background image> <container>:/home/audiogram/audiogram/settings/backgrounds/<background image>

Every time I make a change to the theme file I just have to recopy it over and refresh my audiogram tab to have the changes take effect.

@veltman
Copy link
Contributor

veltman commented Aug 14, 2016

Yes, this is a general issue of working with Docker. Changes you make to the file on your computer won't show up in the Docker container automatically. You have a few choices:

  1. edit the settings/themes.json file in the Docker container instead
  2. edit it on your computer and copy it, e.g. docker cp /where/i/edited/settings/themes.json audiogram:/home/audiogram/audiogram/settings/themes.json
  3. if you’re using your own repo, commit the changes and build a docker image from that repo instead
  4. Delete the settings folder from the Docker container and mount your local settings folder that you’re editing, by running it with something like:

docker run -p 8888:8888 -v /where/your/settings/folder/is/:/home/audiogram/audiogram/settings/ -t -i audiogram

Now changes you save in /where/your/settings/folder/is/ should be reflected.

@veltman veltman closed this as completed Aug 14, 2016
@mobiuscoffee
Copy link
Author

I tried running the command to mount my local settings folder, and after figuring out c:/ has to be /c/ in Docker I ran into a different problem that I'm not sure how to fix.

I ran npm start and got a bunch of errors.

audiogram@e0192e004f54:~/audiogram$ npm start

> audiogram@0.9.4 start /home/audiogram/audiogram
> npm run postinstall && bin/server


> audiogram@0.9.4 postinstall /home/audiogram/audiogram
> mkdir -p editor/js && browserify client/index.js > editor/js/bundle.js

module.js:328
    throw err;
    ^

Error: Cannot find module '../settings/'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/audiogram/audiogram/server/render.js:1:84)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)

npm ERR! Linux 4.4.16-boot2docker
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! audiogram@0.9.4 start: `npm run postinstall && bin/server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the audiogram@0.9.4 start script 'npm run postinstall && bin/server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the audiogram package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run postinstall && bin/server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs audiogram
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls audiogram
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/audiogram/audiogram/npm-debug.log

I copied over the npm-debug.log file like it suggests.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle audiogram@0.9.4~prestart: audiogram@0.9.4
6 silly lifecycle audiogram@0.9.4~prestart: no script for prestart, continuing
7 info lifecycle audiogram@0.9.4~start: audiogram@0.9.4
8 verbose lifecycle audiogram@0.9.4~start: unsafe-perm in lifecycle true
9 verbose lifecycle audiogram@0.9.4~start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/audiogram/audiogram/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle audiogram@0.9.4~start: CWD: /home/audiogram/audiogram
11 silly lifecycle audiogram@0.9.4~start: Args: [ '-c', 'npm run postinstall && bin/server' ]
12 silly lifecycle audiogram@0.9.4~start: Returned: code: 1  signal: null
13 info lifecycle audiogram@0.9.4~start: Failed to exec start script
14 verbose stack Error: audiogram@0.9.4 start: `npm run postinstall && bin/server`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid audiogram@0.9.4
16 verbose cwd /home/audiogram/audiogram
17 error Linux 4.4.16-boot2docker
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v4.2.6
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error audiogram@0.9.4 start: `npm run postinstall && bin/server`
22 error Exit status 1
23 error Failed at the audiogram@0.9.4 start script 'npm run postinstall && bin/server'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the audiogram package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run postinstall && bin/server
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs audiogram
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls audiogram
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants