Is it recommended to use Database as a container in Production environment?

This blog post lists some reasons why you should not run production databases in containers. It also references another blog post describing problems with updating docker and unstable storage drivers. The main points here for me boil down to this: Dodgy storage drivers. This may be less of a problem when you write your database … Read more

Moving app to production mode in Symfony 2

Couple more things to consider: php app/console cache:clear –env=prod –no-debug php app/console assets:install web_directory php app/console assetic:dump web_directory You might also run into permission issues with the cache directory. I would actually first make sure everything works in development mode on the server before switching to production mode. And if all you get is blank … Read more

Node.js, express, and using development versus production in app.configure

Your approach is ok, but you can make something more generic, like storing the config data for Redis in a file or passing the host and port like arguments: node app.js REDIS_HOST REDIS_PORT Then in your app you can grab them using process.argv: app.configure(‘development’, function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); var r = require(“redis”).createClient(process.argv[2], … Read more

Visualizing your code’s architecture [closed]

I am afraid that there is no perfect tool for comprehensive visualizing your program architecture and its control flow, you should keep them in your head and make your software architecture clean, uniform and predictable. However there are some tools that can help you. In Pycharm you can: view structure and hierarchy of the source … Read more

Rails Internationalization (I18n) in model validations: Possible or not?

The solution is to NOT include any custom message keys in the models, like… :message => I18n.t(‘activerecord.errors.models.my_model.attributes.whatever.please_select_whatever’) The model will then apply the default message keys, for example “:inclusion” in the case of “validates_inclusion_of” …and in config/locales/en.yml you need to have: en: activerecord: errors: models: my_model: attributes: whatever: inclusion: “Please select whatever.” # see default … Read more

tech