On 5/02/2016 23:37, Nikolaus Thümmel wrote:
> I was recently trying to set up a personal firefox sync + account
> server,

Thanks for reaching out, and sorry for the delay replying here.  I'm
always happy to hear about people trying this out, even if it doesn't
always go as smoothly as we might like...

> and wondered how to set up the fxa-auth-server in production
> mode. What is the "official" way of doing so?

It probably doesn't sound suitably "official", but in production we run
fxa-auth-server under the circus process manager [1], running a command
like this (but all on one line obviously):

  CONFIG_FILES=/path/to/config/file.json \
  NODE_ENV=prod \
  ./scripts/start-server.sh

Stdout and stderr are directed to log files and slurped up by our log
aggregation software.

On the same box, we also run the auth-db-mysql server as:

  /usr/bin/node ./bin/server.js


> It looks like all npm scripts are actually enforcing NODE_ENV=dev.

IIUC this is mostly just so they're easy to use in dev and testing
environments.  Perhaps we should change them to respect any existing
NODE_ENV= environment variable rather than always overwriting it to dev.

> Also, when running in this enforced dev mode, there is a hidden file
> test/.env.dev which seems to overwrite some config entries with some
> arbitrary values. Why?

This is an envc [2] settings file, just used as a convenient way to
store the settings necessary to run the tests.


I hope this helps a little, please feel free to ask any follow-up
questions here as well.


  Cheers,

    Ryan


[1] http://circus.readthedocs.org/en/latest/
[2] https://www.npmjs.com/package/envc
_______________________________________________
Dev-fxacct mailing list
[email protected]
https://mail.mozilla.org/listinfo/dev-fxacct

Reply via email to