Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dr Kim Foale
    @kimadactyl
    heya all, trying to set my existing rails app to work with azk, does anyone have a good tutorial? most of the stuff im reading presumes youre starting from scratch :) seems like an amazing tool :D
    Dr Kim Foale
    @kimadactyl
    Specifically im wondering how to configure and copy over my existing database
    The azkfile directs me to here but not sure how to use this file :) https://gist.github.com/gullitmiranda/62082f2e47c364ef9617
    Dr Kim Foale
    @kimadactyl
    My azk init script has given me command: ["bundle", "exec", "rackup", "config.ru", "--pid", "/tmp/ruby.pid", "--port", "$HTTP_PORT", "--host", "0.0.0.0"] is that correct? I'm 95% sure this is a database problem but just checking everything
    Seems a very odd method: if im running it locally, and presuming "command" is what i want i just use bundle exec rails server but that doesn't seem to work here?
    Gullit Miranda
    @gullitmiranda
    hi @kimadactyl
    Dr Kim Foale
    @kimadactyl
    hey there :)
    Gullit Miranda
    @gullitmiranda
    have you seen the https://blog.azukiapp.com/? has some articles that may interest you
    Dr Kim Foale
    @kimadactyl
    im basically following the tutorial from digital ocean and trying to understand everything that's going on
    currently it works if i run bundle exec rackup config.ru --pid /tmp/ruby.pid --port 3000 --host 0.0.0.0 from inside the azk shell, but azk start isnt working, 500 error
    feels really close
    Gullit Miranda
    @gullitmiranda
    about command: to rails app, use can use ["rails", "s", "--port $HTTP_PORT", "--binding 0.0.0.0"]
    Dr Kim Foale
    @kimadactyl
    what's the reason for having it all seperated in quotes?
    and where is $HTTP_PORT declared?
    Gullit Miranda
    @gullitmiranda
    the array allows you to pass the commands separately to the tty.
    Dr Kim Foale
    @kimadactyl
    why do i want to do that? isn't it a one liner?
    ok, with command: ["rails", "s", "--port $HTTP_PORT", "--binding 0.0.0.0"],, i get this: http://pastebin.com/nwMYJqk5
    Gullit Miranda
    @gullitmiranda
    the $HTTP_PORT is generated from:
    ports: {
      http: '3000/tcp'
    }
    Dr Kim Foale
    @kimadactyl
    ok, that's neat :)
    Gullit Miranda
    @gullitmiranda
    images with entrypoint may need this.
    ow. try ["bundle", "exec", "rails", ...]
    because the PATH does not include the binary in the bundle
    you can see with: azk shell [system_name] -- echo \$PATH
    Dr Kim Foale
    @kimadactyl
    ok
    just take out the port? seems needed
    Gullit Miranda
    @gullitmiranda
    one moment
    Dr Kim Foale
    @kimadactyl
    thanks for the help, no hurry :)
    oh if i just do it with bundle, exec, rails, s it loads but cant seem to access it hmmm
    Gullit Miranda
    @gullitmiranda
    I am installing the rails in a container to catch the correct options. some time ago, that does not program in rails, so I do not remember.
    Dr Kim Foale
    @kimadactyl
    no worries :)
    Gullit Miranda
    @gullitmiranda
    but for that you can better understand. the two required options are:
    port: $HTTP_PORT (defined in Azkfile or auto)
    binding: 0.0.0.0 to allow the application to be accessed outside of the container (apart from `127.0.0.1, tha is default)
    Dr Kim Foale
    @kimadactyl
    hum. if i start it without those settings it greens up and looks like it's loaded but won't let me access it
    but if i add the settings it crashes on the line
    same with this one azk: Run system `taichi-school` return: (1), for command: ["bundle","exec","rackup","config.ru","--pid","/tmp/ruby.pid","--port","$HTTP_PORT","--host","0.0.0.0"]:
    manually setting the port to 3000 greens up to but won't load
    Gullit Miranda
    @gullitmiranda
    this command wont work for new applications. May be that is missing something in the config.ru.
    what is the command that you usually use without the azk?
    Dr Kim Foale
    @kimadactyl
    just rails server
    i don't really think about it ^^
    Gullit Miranda
    @gullitmiranda
    I understand. when I was working with everything on my machine it didn't think of it =D
    Dr Kim Foale
    @kimadactyl
    yeah :D all this puma/rack/unicorn stuff just goes over my head
    Gullit Miranda
    @gullitmiranda
    I created an application with rails, I'm going to pick up the correct command.
    rsrs
    Dr Kim Foale
    @kimadactyl
    im really not sure $HTTP_PORT is working properly. hmmm.
    shall i chuck everything in a gist?
    Gullit Miranda
    @gullitmiranda
          command: ["bundle", "exec", "rails", "server", "--pid", "/tmp/rails.pid", "--port=$HTTP_PORT", "--binding=0.0.0.0"]
          // or
          // command: "bundle exec rails server --pid /tmp/rails.pid --port=$HTTP_PORT --binding=0.0.0.0".split(" ")
    the HTTP_PORT is for you to set on which port the rails server will be available
    Dr Kim Foale
    @kimadactyl
    do i set it manually?
    Gullit Miranda
    @gullitmiranda
    you can use:
    ports: {
      http: '3000/tcp'
      // http: '5000/tcp'
      // http: '8080/tcp'
      // http: '80/tcp'
      // ....
    }