A modern inventory management system designed for bars, restaurants, and beverage establishments. Built with Ruby on Rails and containerized with Docker for easy deployment.
- π¦ Inventory Management - Track all your beverages, ingredients, and supplies
- πΈ Image Support - Upload and display product images
- π·οΈ Category System - Organize items with flexible categorization
- π¨ Stock Alerts - Automatic low-stock and out-of-stock notifications
- π Smart Filtering - Search and filter by name, category, type, and stock status
- π Restocking Dashboard - Dedicated view for items needing attention
- π User Authentication - Secure login system with session management
- π Dark Theme - Modern dark UI that's easy on the eyes
BarKeep is available as a pre-built Docker image on GitHub Container Registry (GHCR) for easy deployment.
- Docker and Docker Compose installed
-
Generate a secret key (Required!)
# Pull the image and generate a secret key docker run --rm ghcr.io/nckslvrmn/bar_keep:latest rails secret
Copy this key - you'll need it for the next step. Keep it safe and never commit it to version control!
-
Run the container
# Run the container with persistent storage and your secret key docker run -d \ --name barkeep \ -p 3000:3000 \ -v $(pwd)/storage:/app/storage \ -e SECRET_KEY_BASE=YOUR_GENERATED_SECRET_KEY_HERE \ -e ALLOWED_HOST=barkeep.yourdomain.com # Set to your custom domain \ -e FORCE_SSL=false \ ghcr.io/nckslvrmn/bar_keep:latest
Note: The database will be automatically created, migrated, and seeded on first run!
For production deployments: Remove
-e FORCE_SSL=false
to enable SSL security unless behind a proxy -
Access the application
Open your browser and navigate to
http://localhost:3000
-
Create a
docker-compose.yml
file:version: '3.8' services: app: image: ghcr.io/nckslvrmn/bar_keep:latest ports: - "3000:3000" volumes: - ./storage:/app/storage environment: - RAILS_ENV=production - SECRET_KEY_BASE=YOUR_GENERATED_SECRET_KEY_HERE # Required! - ALLOWED_HOST=barkeep.yourdomain.com # Set to your custom domain - FORCE_SSL=false # leave as false if hosted behind proxy
-
Run:
docker-compose up -d
latest
- The most recent stable releasevX.Y.Z
- Specific release versions (e.g.,v1.0.0
)
All application data is stored in the storage
directory:
- SQLite databases - All environments (development, production, test)
- Uploaded images - Product images via ActiveStorage
- User sessions - Authentication data
When replacing or updating containers, ensure you mount the same storage volume to maintain your data.
If you want to run BarKeep without Docker for development:
- Ruby 3.4.0
- Bundler
- SQLite3
# Install dependencies
bundle install
# Set up the database
rails db:create
rails db:migrate
rails db:seed # Creates sample data
# Start the server
rails server
If you want to build the Docker image from source for development:
-
Clone the repository
git clone https://github.com/nckslvrmn/bar_keep.git cd bar_keep
-
Build the container
docker build -t bar_keep .
-
Generate a secret key
docker run --rm bar_keep:latest rails secret
-
Run your local build
docker run -d \ --name barkeep-dev \ -p 3000:3000 \ -v $(pwd)/storage:/app/storage \ -e SECRET_KEY_BASE=YOUR_GENERATED_SECRET_KEY_HERE \ -e ALLOWED_HOST=localhost \ -e FORCE_SSL=false \ bar_keep:latest
SECRET_KEY_BASE
- Required! Generate withdocker run --rm bar_keep:latest rails secret
RAILS_ENV
- Set toproduction
for production deployments (default: production)RAILS_MAX_THREADS
- Number of threads (default: 5)FORCE_SSL
- Set tofalse
to disable SSL for local testing or if hosting behind proxyALLOWED_HOST
- Hostname to accept requests from (default: localhost). Set to your domain in productionSEED_DATABASE
- Set to "true" to seed the database in production (optional)
By default, Rails accepts requests from localhost (including 127.0.0.1 and ::1) in production mode. Rails uses a security feature that blocks requests from unknown hosts to prevent DNS rebinding attacks.
The ALLOWED_HOST
environment variable tells Rails which additional hostname to accept requests from. You'll need to set this when:
- Running behind a reverse proxy (nginx, Caddy, etc.)
- Using a custom domain or subdomain
- Accessing the application from a non-localhost address
- Testing with tools like ngrok during development
For example, if your BarKeep instance is accessible at barkeep.yourdomain.com
, you would set ALLOWED_HOST=barkeep.yourdomain.com
. If you're using a reverse proxy, make sure the host matches what the proxy forwards.
BarKeep uses SQLite by default with databases stored in the storage
directory:
- Development:
storage/development.sqlite3
- Production:
storage/production.sqlite3
- Test:
storage/test.sqlite3
If you ran the seed command, you can log in with:
- Username:
admin
- Password:
changeme123
- Adding Items: Click "Add New Item" to add beverages and supplies
- Managing Stock: Use the +/- buttons to quickly adjust quantities
- Restocking: Visit
/items/restocking
to see what needs ordering - Categories: Create categories like "Spirits", "Beer", "Wine", "Mixers"
- Filtering: Use the sidebar filters to find items quickly
For production deployments:
- Use a proper secret key - Generate one using the method shown in the Docker Setup section
- Use a stable version tag - Consider using a specific version tag (e.g.,
ghcr.io/nckslvrmn/bar_keep:v1.0.0
) instead oflatest
for production - Ensure the storage volume is backed up regularly
- Consider using a reverse proxy (nginx, Caddy) for SSL
- Monitor your logs:
docker logs -f barkeep
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Ruby on Rails
- Styled with Bootstrap
- Icons from Unicode Emoji
Made with β€οΈ for the service industry