snippetbox

module
v0.0.0-...-bf23469 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2022 License: MIT

README

Snippetbox

Snippetbox is a golang application for curating snippets

Docker Setup

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 Snippetbox Screenshot. Adminer Adminer Screenshot.

Todo
  • 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
In Progress
  • Add search capabilities by integrating with elasticsearch
Done ✓
  • Cache templates for faster rendering
  • Request logging middleware implemented
  • Panic recovery middleware
  • Add middlewares
  • Dockerize the application

Tools

  • Postgres
  • Elasticsearch

Coverage

Directories

Path Synopsis
cmd
web
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL