1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/contrib/docker
Ryan Russell ff632b1c4b
feat(docker-compose): Add docker-compose.yml #100 (#130)
* feat(docker-compose): Add `docker-compose.yml` #100

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* docs(build-from-source): Include build from source

Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-10 16:30:05 +03:00
..
docker-compose.yml feat(docker-compose): Add docker-compose.yml #100 (#130) 2022-06-10 16:30:05 +03:00
README.md feat(docker-compose): Add docker-compose.yml #100 (#130) 2022-06-10 16:30:05 +03:00

Dragonfly

Dragonfly DB with Docker Compose

This guide will have you up running DragonflyDB with docker-compose in just a few minutes.

| This guide assumes you have docker and docker-compose installed on your machine. If not, Install Docker and Install Docker Compose before continuing.

Step 1

# Download Official Dragonfly DB Docker Compose File
wget https://github.com/dragonflydb/dragonfly/tree/main/contrib/docker/docker-compose.yml

# Launch the Dragonfly DB Instance
docker-compose up -d

# Confirm image is up
docker ps | grep dragonfly
# ac94b5ba30a0   docker.dragonflydb.io/dragonflydb/dragonfly   "entrypoint.sh drago…"   45 seconds ago   Up 31 seconds         0.0.0.0:6379->6379/tcp, :::6379->6379/tcp   docker_dragonfly_1

# Log follow the dragonfly container
docker logs -f docker_dragonfly_1

Dragonfly DB will answer to both http and redis requests out of the box!

You can use redis-cli to connect to localhost:6379 or open a browser and visit http://localhost:6379

Step 2

Connect with a redis client.

From a new terminal:

redis-cli
127.0.0.1:6379> set hello world
OK
127.0.0.1:6379> keys *
1) "hello"
127.0.0.1:6379> get hello
"world"
127.0.0.1:6379> 

Step 3

Continue being great and build your app with the power of DragonflyDB!

More Build Options