Snippetbox is a golang application for curating snippets
Note that to clone the repository you need to have git installed
git clone https://github.com/aitumik/snippetbox
Make sure you have installed docker
cd snippetbox
Here is the docker-compose.yaml
# Application
snippetbox:
container_name: snippetbox
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
depends_on:
- postgres
env_file: .env
volumes:
- ./:/snippetbox
# Database
postgres:
env_file: .env
image: "postgres"
hostname: "postgres"
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
# Adminer
admner:
container_name: admner
image: dockette/adminer
restart: always
ports:
- "8085:80"
depends_on:
- postgres
# Volumes
volumes:
pgdata:
driver: local
Build and Run
docker-compose up -d
Snippetbox . Adminer .
- Oauth2 for authentication
- Redis for caching (we mostly do reads,writes are minimum)
- Kibana for analytics and visualization of data
- Setup CI/CD
- Add coverage tests
- Add search capabilities by integrating with elasticsearch
- Cache templates for faster rendering
- Request logging middleware implemented
- Panic recovery middleware
- Add middlewares
- Dockerize the application
- Postgres
- Elasticsearch