Coder Social home page Coder Social logo

dokku-redis-plugin's Introduction

πŸ’« About Me:

I'm a senior software engineer working on cloud computing technology, primarily in Go. I'm deeply interested in software security and cryptography.

🌐 Socials:

LinkedIn Twitter Mastodon

πŸ’» Tech Stack:

Go Scaleway MariaDB Postgres MySQL Redis ANSIBLE CIRCLECI Docker KIBANA Kubernetes LOGSTASH PACKER PODMAN PROMETHEUS Terraform VAULT Vagrant GIT LINUX

πŸ“Š GitHub Stats:



πŸ” Top Contributed Repo


dokku-redis-plugin's People

Contributors

aljohri avatar amaltson avatar bradwhittington avatar clupprich avatar ebeigarts avatar ernesto-jimenez avatar gcohen55 avatar jeresig avatar jmshal avatar kamui avatar leemhenson avatar luxifer avatar mkly avatar nfelger avatar ohardy avatar pbrumm avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

dokku-redis-plugin's Issues

Question about building of dokku-redis-dockerfiles

@luxifer I'm curious when I run sudo dokku plugins-install and all my plugins install, why is that that the plugin always seemingly rebuilds the docker container? It seems other plugins don't do this. What part of the code causes this to occur?

Cloning into '/tmp/dokku-redis-dockerfiles'...
remote: Reusing existing pack: 29, done.
remote: Total 29 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (29/29), done.
Uploading context 84.99 kB
Uploading context 
Step 0 : FROM ubuntu:quantal
 ---> 5ac751e8d623
Step 1 : MAINTAINER luxifer "[email protected]"
 ---> Using cache
 ---> 0b2f7a2df450
Step 2 : RUN apt-get update
 ---> Using cache
 ---> 150de88b01d4
Step 3 : RUN apt-get -y install redis-server
 ---> Using cache
 ---> f012c37ac0fb
Step 4 : RUN sed -i 's@bind 127.0.0.1@bind 0.0.0.0@' /etc/redis/redis.conf
 ---> Using cache
 ---> 5a5687c88ae5
Step 5 : RUN sed -i 's@daemonize yes@daemonize no@' /etc/redis/redis.conf
 ---> Using cache
 ---> accc8f29e05c
Step 6 : ADD . /bin
 ---> d3fc58d952d0
Step 7 : RUN chmod +x /bin/start_redis.sh
 ---> Running in 890d72ebe996
 ---> 4567fc860fa8
Step 8 : RUN mkdir -p /var/lib/redis
 ---> Running in d490d8a5ead8
 ---> 34e2e9d80294
Successfully built 34e2e9d80294

REDIS_DATABASE env

In some cases we want to use one redis instance by several apps. And we want to select different redis dbs for each of these apps.

Can we have an incremental REDIS_DATABASE variable for this?

Issue with current version of docker?

I get this after installing this plugin and doing a rebuild of an app:

-----> Releasing node-js-app ...

Usage: docker inspect CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container/image

  -format="": Format the output using the given go template.

-----> node-js-app linked to redis/node-js-app container

I'm using Docker 0.7.6

docker inspect error

I'm getting the following error from the redis plugin, not entirely sure what's causing it:

ubuntu@domU-12-31-39-15-08-6C:/home/dokku$ dokku release flask-heroku-sample

Usage: docker inspect CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container/image

  -format="": Format the output using the given go template.
export REDIS_IP=
export REDIS_URL=redis://:6379

-----> flask-heroku-sample linked to redis/flask-heroku-sample container

When testing the redis info:

ubuntu@domU-12-31-39-15-08-6C:~$ dokku redis:info flask-heroku-sample

Usage: docker inspect CONTAINER|IMAGE [CONTAINER|IMAGE...]

Return low-level information on a container/image

  -format="": Format the output using the given go template.

Usage: docker port CONTAINER PRIVATE_PORT

Lookup the public-facing port which is NAT-ed to PRIVATE_PORT

P.S. I'm using the latest version of Dokku as per today (723cf1d43d commit)

No _IP and _PORT env variables created?

I notice in README.md that the deployment output shows a REDIS_IP env var. All I see from an installation as of 1 day ago is a REDIS_URL var. Would not IP and PORT env vars be useful?

What happens at reboot?

  1. Redis is never restarted
  2. There is no way to restar redis unless I manually do the following:
ID=$(docker run -v $VOLUME -p 6379 -d $REDIS_IMAGE /bin/start_redis.sh)

for each project I have.

Is there a possibility to fix this problem?

Error on create after following installation instructions

root@precise64:/var/lib/dokku/plugins# dokku plugins-install
gpg: keyring `/tmp/tmphcaloL/secring.gpg' created
gpg: keyring `/tmp/tmphcaloL/pubring.gpg' created
gpg: requesting key C300EE8C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmphcaloL/trustdb.gpg: trustdb created
gpg: key C300EE8C: public key "Launchpad Stable" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Step 1 : FROM ubuntu:quantal
 ---> b750fe79269d
Step 2 : MAINTAINER luxifer "[email protected]"
 ---> Running in 9872040a902f
 ---> 3d54e8317f5e
Step 3 : RUN apt-get update
 ---> Running in 4023ef5e9b32
 ---> 2b5398cb6307
Step 4 : RUN apt-get -y install redis-server
 ---> Running in 733a6f0d335e
 ---> 6430d2eb2319
Step 5 : ADD . /bin
 ---> 727c9d85d8c0
Step 6 : RUN chmod +x /bin/start_redis.sh
 ---> Running in 55d0012907cf
 ---> ce7bdcc03780
Successfully built ce7bdcc03780

root@precise64:~# dokku redis:create convos
mv: missing destination file operand after `/var/lib/docker/volumes/redis-convos'
Try `mv --help' for more information.

dokku-redis exposed on 0.0.0.0 / public interface

The current version sets a port for the redis-container via the -p switch.
This leads to docker binding that port to 0.0.0.0 /eth0.
For a development setup that seems convenient.
But not the best idea for more productive systems.
I tried to close down the port with iptables... but sunk some hours without success.
Therefore I recommend removing the -p from the commit script.
As linked containers get reported the docker IP anyway.

I have a "fixed" forked version here https://github.com/wesrc/dokku-redis-plugin/commit/101ce67006b1fc45ca924c807941c3dddac5a925 and can do a proper PR if wanted.

Error deleting

I created a container with the same name of the app. It worked. Then I tried delete it but I get this error:

76e6050a9e7f
Error response from daemon: Conflict, cannot delete 13d9c76a1d02 because the container 76e6050a9e7f is using it, use -f to force
FATA[0000] Error: failed to remove one or more images

I stopped the app and tried again and got the same error. Finally I did:

sudo docker rmi -f redis/demo
sudo dokku redis:delete demo

And all seems ok now. It could be a docker's problem.

Pushing to dokku with dokku-redis-plugin fails (Permission denied)

On git push dokku dokku:master (I'm trying dokku out on another branch of my app, and renaming the remote ebranch to master), I'm getting the following output:

...
-----> Discovering process types
       Procfile declares types -> web, worker
       Default process types for Ruby -> rake, console, web, worker
-----> Releasing <app> ...
remote: /var/lib/dokku/plugins/redis/commands: line 111: /home/dokku/<app>/ENV: Permission denied
To dokku@<host>:<app>
 ! [remote rejected] dokku -> master (pre-receive hook declined)
error: failed to push some refs to '<host>:<app>'

Any idea what's going wrong? Line 111 of commands is:

echo -e "$ENV_TEMP" | sed '/^$/d' | sort > $ENV_FILE

I've already run dokku redis:create <app> too. I'm running this on a DigitalOcean dokku droplet (the 1GB instance, if it makes a difference).

dokku redis not starting

Server is digital ocean ubuntu 13.04 64 bit.

heres the output when i try to manually run the image. dokku redis:create never starts it either.

docker run -d redis/lmredis /usr/bin/start_redis.sh
a160971d4e73
root@***********:/var/lib/dokku/plugins# docker ps
ID IMAGE COMMAND CREATED STATUS PORTS
c35cd0a2390e app/lmtools:latest /bin/bash -c /start 16 minutes ago Up 16 minutes 49153->5000

and again with -p

docker run -p 6379 -d redis/lmredis /usr/bin/start_redis.sh
44912b0a2f90
root@***********:/var/lib/dokku/plugins# docker ps
ID IMAGE COMMAND CREATED STATUS PORTS
c35cd0a2390e app/lmtools:latest /bin/bash -c /start 17 minutes ago Up 17 minutes 49153->5000

let me know if you need any other info. I'm fairly new to docker so I'm not totally sure what is needed to debug this.

Heres the error i get when I run it without daemonizing it:

docker run -p 6379 redis/lmredis /usr/bin/start_redis.sh

panic: exec format error

goroutine 1 [running]:
github.com/dotcloud/docker.executeProgram(0x7fff84b32fc5, 0x17, 0xc2000b00c0, 0x1, 0x1, ...)
/go/src/github.com/dotcloud/docker/sysinit.go:81 +0x1b2
github.com/dotcloud/docker.SysInit()
/go/src/github.com/dotcloud/docker/sysinit.go:106 +0x2c6
main.main()
/go/src/github.com/dotcloud/docker/docker/docker.go:25 +0x8b

goroutine 3 [syscall]:
os/signal.loop()
/usr/local/go/src/pkg/os/signal/signal_unix.go:21 +0x1c
created by os/signal.initΒ·1
/usr/local/go/src/pkg/os/signal/signal_unix.go:27 +0x2f

dokku redis:unlink

How do I unlink the redis container from my app? Because I can't remove the redis container.

dokku redis:delete www
b0b7a3a3028f
Error: Conflict, cannot delete 90bd00bd9e8f because the container b0b7a3a3028f is using it
2014/04/21 08:31:00 Error: failed to remove one or more images

Seems to break dokku entirely

I'm using Digital Ocean's dokku image (0.2, I believe). It works great until I install dokku-redis like so:

ssh [email protected]

cd /var/lib/dokku/plugins
git clone https://github.com/luxifer/dokku-redis-plugin redis
dokku plugins-install

After this point, SSH connections to [email protected] are broken - no command, not git pushes are accepted.

Running dokku version doesn't given me anything.

I'm using virtual naming.

REDIS_URL=redis://redis:6379

This can't be right.

dokku redis:create talkingdev
-----> Redis database created: redis_app_talkingdev
-----> Releasing talkingdev ...
-----> Deploying talkingdev ...
-----> Shutting down old containers
=====> Application deployed:

Is this still maintained?

Hi @luxifer !

Thankyou so much for this plugin!

I just installed it into my new Dokku v0.3.19 app, and found I had to make a few changes to get it working with the new version of Docker that it ships with.

Is this plugin still maintained? I'd be happy to help out with it?

Redis Plugin Stopped Working

In the last few days this plugin has completely stopped working and my app is no longer able to connect to the redis store. I've recently updated my dokku install to v0.2.0 but I'm not sure if this issue occurred before or after.

I updated to master for this plugin today, reran dokku plugins-install, and rebooted a few times. The plugin shows up when I run dokku plugins and when I run dokku help but I don't see a redis process when I run docker ps. I do see the output from the redis pre-release hook when I deploy but my app is not able to connect to the redis store.

Running any dokku:redis command doesn't seem to do anything and produces no output. Here is the output from dokku redis:info www with DOKKU_TRACE set:

+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/postgresql/commands /var/lib/dokku/plugins/redis/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands redis:info www
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/backup/commands redis:info www
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/config/commands redis:info www
+ [[ redis:info == config ]]
+ [[ redis:info == config:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands redis:info www
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands redis:info www
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/postgresql/commands redis:info www

Redis connect failed (connect ENOENT)

I've created a container:

dokku redis:create myapp

I'see the specific redis var:

dokku config

=== myapp config vars ===
REDIS_URL: redis://172.17.0.61:6379

But then, when I try to connect to the redis instance, I have the following error in the dokku logs:

> node app.js
Main stream starting
Error Error: Redis connection to redis://172.17.0.38:6379 failed - connect ENOENT

the redis instance seems to be running ( a ps confirm it), but there is nothing in redis log...Any help appreciate, thanks in advance

redis:link produce wrong url after system restart

Hello. thank you for plugin.

Ubuntu 14.04
dokku v0.3.16
dokku-redis-plugin installed from readme instructions (no release versioning)

After first installation application linked with error:

bad URI(is not URI?): redis://174.17.0.44 174.17.0.44:6379 (URI::InvalidURIError)

dancing with a tambourine, restart app, stop/start redis container directly with docker – :link command get me right url redis://174.17.0.44:6379$ (Dollar dollar sign on the end? hmmm, strange... but rails parse url correctly and accept).

Day later, server was restarted – link broken again.
In this time only manual dokku config:set REDIS_URL allow me run my application linked with redis.

What i am doing wrong?

Import / export dumps

How can I import / export dumps?

Should I install redis-cli in my server to connect locally to the redis db?

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.