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
    oh rs is brazilian portugese for ha? nice :D
    Everton Ribeiro
    @nuxlli
    probably you are still having to put the port because browser cache still live
    Dr Kim Foale
    @kimadactyl
    ok
    restart?
    chrome cache is bane of my web dev life hah
    Everton Ribeiro
    @nuxlli
    what, we will correct the db
    try this:
    Dr Kim Foale
    @kimadactyl
    oh it just started working portless :) apparently whine enough and it works
    Everton Ribeiro
    @nuxlli
    azk stop
    azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
    azk start -R
    Dr Kim Foale
    @kimadactyl
    no luck
    Everton Ribeiro
    @nuxlli
    :/
    output?
    Dr Kim Foale
    @kimadactyl
    kim@chips:~/git/taichi/taichi_rails$ azk stop
    azk: ↓ stopping `taichi-school` system, 1 instances...
    azk: ↓ stopping `postgres` system, 1 instances...
    
    ┌───┬───────────────┬───────────┬──────────────────────────┬─────────────────┬─────────────┐
    │   │ System        │ Instances │ Hostname/url             │ Instances-Ports │ Provisioned │
    ├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
    │ ↓ │ postgres      │ 0         │ dev.azk.io               │ -               │ -           │
    ├───┼───────────────┼───────────┼──────────────────────────┼─────────────────┼─────────────┤
    │ ↓ │ taichi-school │ 0         │ taichi-school.dev.azk.io │ -               │ 4 hours ago │
    └───┴───────────────┴───────────┴──────────────────────────┴─────────────────┴─────────────┘
    kim@chips:~/git/taichi/taichi_rails$ azk shell postgres -- rm -Rf '/var/lib/postgres/data/*'
    kim@chips:~/git/taichi/taichi_rails$ azk start -R
    azk: ↑ starting `postgres` system, 1 new instances...
    azk: ✓ checking `azukiapp/postgres:9.4` image...
    azk: ◴ waiting for `postgres` system to start, trying connection to port data/tcp...
    azk: ↑ starting `taichi-school` system, 1 new instances...
    azk: ✓ checking `azukiapp/ruby:2.3.0` image...
    azk: ↻ provisioning `taichi-school` system...
    azk: ⎘ syncing files for `taichi-school` system...
    azk: ◴ waiting for `taichi-school` system to start, trying connection to port http/tcp...
    
    ┌───┬───────────────┬───────────┬─────────────────────────────────┬─────────────────┬───────────────────┐
    │   │ System        │ Instances │ Hostname/url                    │ Instances-Ports │ Provisioned       │
    ├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
    │ ↑ │ postgres      │ 1         │ dev.azk.io                      │ 1-data:32788    │ -                 │
    ├───┼───────────────┼───────────┼─────────────────────────────────┼─────────────────┼───────────────────┤
    │ ↑ │ taichi-school │ 1         │ http://taichi-school.dev.azk.io │ 1-http:32789    │ a few seconds ago │
    └───┴───────────────┴───────────┴─────────────────────────────────┴─────────────────┴───────────────────┘
    kim@chips:~/git/taichi/taichi_rails$
    Everton Ribeiro
    @nuxlli
    cat config/database.yml
    Dr Kim Foale
    @kimadactyl
    its your one
    kim@chips:~/git/taichi/taichi_rails$ cat config/database.yml
    <%
    require 'cgi'
    require 'uri'
    begin
      uri = URI.parse(ENV["DATABASE_URL"])
    rescue URI::InvalidURIError
      raise "Invalid DATABASE_URL"
    end
    env = ENV["RAILS_ENV"] || ENV["RACK_ENV"]
    raise "No RACK_ENV or RAILS_ENV found" unless env
    def attribute(name, value, force_string = false)
      if value
        value_string =
          if force_string
            '"' + value + '"'
          else
            value
          end
        "#{name}: #{value_string}"
      else
        ""
      end
    end
    database = "#{(uri.path || "").split("/")[1]}_#{env}"
    username = uri.user
    password = uri.password
    host     = uri.host
    port     = uri.port
    params   = CGI.parse(uri.query || "")
    params["encoding"] = ["utf8"] unless params["encoding"].present?
    params["pool"    ] = [5]      unless params["pool"    ].present?
    adapter = case uri.scheme.to_s
              when "postgres" then "postgresql"
              when "mysql"    then "mysql2"
              else uri.scheme.to_s
              end
    %>
    
    <%= env %>:
      <%= attribute "adapter",  adapter %>
      <%= attribute "database", database %>
      <%= attribute "username", username %>
      <%= attribute "password", password, true %>
      <%= attribute "host",     host %>
      <%= attribute "port",     port %>
    
    <% params.each do |key, value| %>
      <%= key %>: <%= value.first %>
    <% end %>
    which tbh i dont like cuz i cant load it locally now :D but w/e for time being
    Everton Ribeiro
    @nuxlli
    the way around this ;)
    I can see the database error?
    Dr Kim Foale
    @kimadactyl
    wait. im a dumbass. ive not pushed my db data. lol
    sorry
    how do i push over my database to the azk image?
    Everton Ribeiro
    @nuxlli
    hahaha
    Gullit Miranda
    @gullitmiranda
    Whatsapp format of your data?
    Dr Kim Foale
    @kimadactyl
    erm just a postgres database
    Gullit Miranda
    @gullitmiranda
    SQL dump file or seed?
    Dr Kim Foale
    @kimadactyl
    (fwiw i hate postgres i only migrated for heroku)
    Gullit Miranda
    @gullitmiranda
    You prefer mysql?
    Dr Kim Foale
    @kimadactyl
    i dont care at this point
    lol
    Everton Ribeiro
    @nuxlli
    @gullitmiranda will help you because he has more experience with the use of images
    Dr Kim Foale
    @kimadactyl
    the postgres db seems to be working fine on my azk image (is there a name for it?)
    just now dont know how to transfer my local db over?
    Everton Ribeiro
    @nuxlli
    about de the https erro, you can vote this issue? azukiapp/azk#340
    Dr Kim Foale
    @kimadactyl
    vote? want me to put a comment?
    Everton Ribeiro
    @nuxlli
    feel free ;)
    is just so we can prioritize according to demand
    Dr Kim Foale
    @kimadactyl
    yeah np
    wait github has reactions now :o
    Everton Ribeiro
    @nuxlli
    thanks ;)
    yes, hahah
    Gullit Miranda
    @gullitmiranda
    @kimadactyl you can make this question in http://stackoverflow.com/questions/tagged/azk while preparing the list of commands?
    so is documenting for other people.
    Dr Kim Foale
    @kimadactyl
    yes sure
    Gullit Miranda
    @gullitmiranda
    in the README of the image mysql (http://images.azk.io/#/mysql?_k=yvigvq) has already documented this. When I get time I will do the same in postgres, if someone doesn't do a PR before =D.
    Everton Ribeiro
    @nuxlli
    @kimadctyl while @gullitmiranda help you with thedb, can do a test for me just to make sure if we can solve the problem with the dns?
    Dr Kim Foale
    @kimadactyl
    do you have a name for what azk creates? images? vms? something else?
    beans? ;)
    Everton Ribeiro
    @nuxlli
    haha, nice idea ;)
    you can roolback the /etc/nsswitch.conf?