Snippet Box – A Self Hosted Snippet Organizer on Docker
In this tutorial, you’ll be learning how to setup Snippet Box – A Self-Hosted Snippet Organizer on Docker
What is Snippet Box ?
- Snippet Box is a simple self-hosted app for organizing your code snippets.
- It allows you to easily create, edit, browse and manage your snippets in various languages.
- Using Markdown, Snippet Box makes it very easy to add notes or simple documentation to your code.
- It is lightweight, open source and free to use
- It can be deployed and managed easily with Docker and Docker-Compose
- Docker and Docker-Compose on Ubuntu installed and ready to use
Steps to Deploy Snippet Box on Docker
1. Create a directory and a docker-compose yaml file for the project
# Create a directory for the project
# Navigate into the directory
# Create a docker compose yaml file
2. Add the configuration to the yaml file as shown
# The only modifications required here are volumes and port mapping as per your requirement
# Volume - In this case a folder called data will be created where the container data is stored
# Port - The port mapping can be changed as per convenience where the port on the left side ":" is the host port and right side is the container port
3. Browse to http://<ip>:<port> to access the installation. You should be able to see the dashboard as shown below
Congratulations!! You have successfully deployed Snippet Box on Docker
Steps to Create a Snippet on Snippet Box
1. Click on the Editor button as shown below and enter your snippet details
2. You should now be able to see your snippet in the dashboard as shown
Congratulations!! You have successfully created a snippet on your Snippet Box