Git Product home page Git Product logo

Comments (6)

kostya avatar kostya commented on August 27, 2024

Hi, yeah i understand the problem. Never used it.
There is little difference with bluepill, bluepill start new server every load (so start it with all local env variables), but eye not. So not easy to transfer env variables to already runned eye server (you can do it only with first load) with current config-parsing model.

So such variant works:

1.eye

Eye.app :some do
  env 'RAILS_ENV' => ENV['RAILS_ENV']
end
RAILS_ENV=dev eye load 1.eye

eye x -c

Current config: 
---
:settings: {}
:applications:
  some:
    :name: some
    :environment:
      RAILS_ENV: dev

after first load you can not change env variables:

RAILS_ENV=dev2 eye load 1.eye

eye x -c

Current config: 
---
:settings: {}
:applications:
  some:
    :name: some
    :environment:
      RAILS_ENV: dev

I prefer this variant:

common.rb

Eye.app :some do
  env 'RAILS_ENV' => RAILS_ENV
end

dev.eye

RAILS_ENV='development'
Eye.load('common.rb')

prod.eye

RAILS_ENV='production'
Eye.load('common.rb')

from eye.

whitelancer avatar whitelancer commented on August 27, 2024

Thank you, Kostya. I'll give this a shot! I didn't understand how the server works so this is helpful. On another note, if we manually kill/quit the server, can you reload it with a new environment?

This would not work:

RAILS_ENV=dev1 eye load 1.eye
RAILS_ENV=dev2 eye load 1.eye

But would this work?

RAILS_ENV=dev1 eye load 1.eye
eye quit
RAILS_ENV=dev2 eye load 1.eye

from eye.

kostya avatar kostya commented on August 27, 2024

yes this should work, but looks strange

from eye.

whitelancer avatar whitelancer commented on August 27, 2024

OK, thanks. Typically we only do this during a deploy, so our deploy generally is loading the config up, and when we re-deploy we shut all the jobs down (quit), deploy code, then fire up the new code, so that we don't have any old code being run by any of our background jobs.

Is there a better way you can see us using this? Thanks!

from eye.

kostya avatar kostya commented on August 27, 2024

if you do quit it not stops monitored processes. you should call stop.
my deploy here: https://github.com/kostya/eye/wiki/Deploy-with-capistrano

from eye.

whitelancer avatar whitelancer commented on August 27, 2024

Right, gotcha. Bluepill works the same way: a stop to quit the processes, then a quit to terminate the manager. OK, thanks for that link. You've been extremely helpful, thank you!

from eye.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.