Skip to content

Asynq monitor server with authentication middleware

Notifications You must be signed in to change notification settings

simpsons310/asynqmon-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asynqmon Auth

A webserver with basic authentication middleware for package Asynqmon

Configuration

  • Environment variables: checking .env.example or table below
# Server port
SERVER_PORT=8080
# Authentication mode for web-server. Accept modes:
# - `none` - disable authentication
# - `basic` - basic authentication
# - `http` - authentication via http (TODO)
SERVER_AUTH_MODE=basic
# Username & password for basic authentication
SERVER_AUTH_BASIC_USERNAME=
SERVER_AUTH_BASIC_PASSWORD=

# Asynqmon environment variables
ASYNQ_MON_ROOT_PATH=/
ASYNQ_READ_ONLY=false
ASYNQ_REDIS_DSN=redis://127.0.0.1:6379/0
ASYNQ_REDIS_INSECURE_TLS=false

Running package

Running in source code

# Running with make
make run

Running with binary

# build binary
make build

# running with binary
./build/asynqmon_auth
  • Binary accept first argument as server port. This argument will override environment variable SERVER_PORT
./build/asynqmon_auth 8080

Running with docker

  • Build/pull image
# Build docker image in local
make build

# Pull docker image from registry
docker pull simpsons310/asynqmon-auth
  • Run image
# Docker command
docker run --rm \
    --name asynqmon-auth \
    --env-file .env
    -p 8080:8080
    simpsons310/asynqmon-auth

# With source code
make docker-run

NOTE

This package is created just for practice purpose. I'm newbie to golang 😄. I've referenced from syahidfrd/asynqmon-handler

TODO

  • Push image to docker registry
  • Versioning
  • Authentication via HTTP

About

Asynq monitor server with authentication middleware

Resources

Stars

Watchers

Forks

Packages

No packages published