deis / helloworld Goto Github PK
View Code? Open in Web Editor NEWA hello world app, written in Go.
License: MIT License
A hello world app, written in Go.
License: MIT License
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.