| v2.0.0.beta-15

Docker

Learn how to self-host Shelve using Docker

Self-Hosting with Docker

Shelve provides official Docker images and a Docker Compose configuration for easy self-hosting. This guide will walk you through the process of deploying Shelve using Docker.

Docker Images

Official Shelve images are available on GitHub Container Registry. You can pull the latest version or a specific one:

terminal
# Pull latest version
docker pull ghcr.io/hugorcd/shelve:latest

# Pull specific version
docker pull ghcr.io/hugorcd/shelve:v2.0.0.beta-11

If you opt for the image setup, you will have to provide the necessary services (PostgreSQL, Redis) and connect them manually by setting the required environment variables:

  • DATABASE_URL
  • NUXT_PRIVATE_REDIS_URL

Docker Compose

The recommended way to deploy Shelve is using Docker Compose, which will handle all the required services (PostgreSQL, Redis) and their configuration. Check the Docker Compose file for the community version or app-compose.coolify.yml for the Coolify version.

To deploy Shelve using Docker Compose, follow these steps:

Health Checks

The Docker Compose configuration includes health checks for all services:

  • Shelve application: Checks the API endpoint every 30 seconds
  • PostgreSQL: Verifies database connectivity
  • Redis: Ensures Redis is responding

Resource Management

The configuration includes resource limits to ensure stable operation:

  • CPU: 1 core limit, 0.5 core reserved
  • Memory: 1GB limit, 512MB reserved

Data Persistence

Data is persisted using Docker volumes:

  • postgres: PostgreSQL data
  • redis: Redis data These volumes ensure your data survives container restarts.

Troubleshooting

If you encounter issues, check the container logs:

terminal
# All services
docker compose logs

# Specific service
docker compose logs <service-name>

For more detailed logs, you can find them in the JSON log files (limited to 10MB per file, 3 files maximum).

Upgrading

To upgrade Shelve, pull the latest image and restart the services:

Pull the latest image:

terminal
docker compose pull

Restart the services:

terminal
docker compose down
docker compose up -d

Security Considerations

  • Always use strong, unique values for sensitive environment variables
  • Consider using a reverse proxy with SSL termination
  • Regularly update to the latest version for security patches
  • Restrict network access as needed
Edit this page