Closed larssb closed 4 years ago
Anyone? Maybe you @benjamin-hull .... thank you.
Hi @larssb, apologies for the delayed response - I've been out of action the past few days.
As it stands, you'll need a config/database.yml
file to run this in development mode. This is left out of source control as it will generally need DB credentials which you won't want to commit. I haven't tried running it via environment variables as Heroku will.
In its simplest form your database.yml file can look like this (assuming using an unprotected development DB):
# Provide the DB connection params for your environments.
# On Heroku, these params are taken from the environment, and this file is not used
#
# Valid keys are:
# - host
# - port
# - options
# - dbname
# - user
# - password
default: &default
adapter: postgresql
encoding: unicode
port: 5432
pool: 5
development:
<<: *default
dbname: instagram-token-agent
test:
<<: *default
dbname: instagram-token-agent-test
production:
<<: *default
dbname: instagram-token-agent
Once you add that file, you'll also need to run:
createdb instagram-token-agent
to create the postgres DBbundle exec rake setup
to add the DB table and perform the initial request.I also don't have much experience with Docker, so I'm not sure how that will be affected if at all.
Hi again @larssb - just a heads-up, a Docker compatible fork of the repo has been created here: https://github.com/maxiR8/instagram-token-agent - I haven't tested it myself, but you might want to check it out.
Closing for now, as I don't have docker experience, and can't commit to maintaining the functionality.
INTRO
I'm trying to setup this instagram-token-agent as part of using InstaFeed towards the new Instagram Basic Display API.
I'm more than willing to share the Docker setup when done. However, I need some pointers as I'm not a particularly experienced Ruby developer to put it mildly. PR and all that jazz 👍
THE ISSUE
So I've been able to install the Gems, postgres. Postgres is running/started. I've set the
export DATABASE_URL="https://127.0.0.1:5432"
environment variable. However, the following error is thrown:Yes I sure don't have a
config
or adatabase.yml
file. Also, I think the postgres setup I have is not compatible with the way the instagram-token-agent app is "looking" for a database to connect to. Specifically (this)[https://github.com/companionstudio/instagram-token-agent/blob/d88e0192cbe88083295afdfcca9c0c6dfdc28e33/lib/instagram_token_agent/store.rb#L8] part of the code. Where a connection pool is used.SETUP
bundle install
brew install postgres
SEEKING
Guidance/help on how-to get over this bump of setting the app on my Mac so that I can continue my journey into getting this to work in a container. So, if there is more info that could be helpful to me in regards to getting to the above end goal I'll be more than happy to get that.
Thank you very much 💯