dryck

command module
v0.0.0-...-78a518a Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 15 Imported by: 0

README

dryck

Build Status Go Report Card

dryck is a very simple web app written in Go using Gin to keep track of the amount of drinks taken by different people in a shared space. At the moment it doesn't support user authentication, so you should trust everyone who has access to it. If you set the environment variable HTTP_PASSWORD, you can limit the access in a very simple way with HTTP Basic Auth (username: dryck). If HTTP_PASSWORD is not set, dryck won't require authentication. Also adding new drinks is only possible by editing the underlying Postgres database directly.

Installation

The simplest way to start the application is by using docker compose.

  1. Install docker and docker compose.
  2. Create a docker-compose.yml with the following content and change the variables according to your needs:
version: '2.0'
services:
  web:
    image: fredericobormann/dryck
    restart: always
    environment:
      POSTGRES_HOST: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: mysecretpassword
      POSTGRES_DATABASE: postgres
      GIN_MODE: release
      HTTP_PASSWORD: mysecretpassword
      JWT_SECRET: changethisinproduction
    ports:
      - "8089:8080"
    depends_on:
      - postgres
  postgres:
    image: postgres
    restart: always
    environment:
      POSTGRES_PASSWORD: mysecretpassword
    ports:
      - "5432:5432"
    volumes:
      - db-data:/var/lib/postgresql/data
volumes:
  db-data:
    driver: local
  1. Then start everything by
docker-compose up -d

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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