GithubHelp home page GithubHelp logo

helloworld's Introduction

Deis Hello World Application

helloworld's People

Contributors

mboersma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helloworld's Issues

application dev question

I'm not sure where this question should go but I'll try here.

I've got some go demo applications running on my deis cluster in AWS. They work fine with the "herokuish" workflow. That's going great.

I understand that I should be setting my DATABASE_URL var on the applications to tell them how to reach the database. In fact, I have this working fine for development on my local workstation.

My question is two fold: One, how does one decide what the DATABASE_URL should be for the deis deployment? I noticed some likely looking keys in etcd but clearly my app shouldn't be groping through etcd, it should be configured "from the outside" into an env var, right? How do I know what that value should be? deisctl list shows a database server running, but I'm not sure how to pick the DATABASE_URL to point at it.

Related to this: I have an sql provisioning script that needs to run before the applications are turned on. I looked at running a command through deis run but that seems to want to run something inside one of my app containers, which isn't really what I want. I'd like to do something like heroku run bash and then quest use psql from the command line. (PS: I guess this heroku pg:connect or something similar.) I suppose I could build a separate container and deploy that with psql and a copy of my provisioning sql in it but that brings us back to the issue of how to set the DATABASE_URL so it can point at the postgres instance?

Final part: Is there a way to do "sudo -u postgres createdb foo". I sshed to the cluster, found the machine that was running postgres and noticed this in the ps list:

root      2786  0.0  0.0  43000  3148 ?        S    Jan04   0:00 sudo -i -u postgres /usr/lib/postgresql/9.3/bin/postgres -c config-file=/etc/postgresql/9.3/main/postgresql.conf -c listen-addresses=*

But if I try to do sudo -u postgres (either as root or core) it says

sudo: unknown user: postgres
sudo: unable to initialize policy plugin

Any help would be appreciated. Thanks.
ian

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.