post-requester

command module
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 8 Imported by: 0

README

post-requester

Go Report Card

A microservice application, which gets files from a SMB share and post their content to an API Endpoint.

Env Variables

Set the following required Env Variables to start the HTTP Post Handler

export ENDPOINT_USERNAME=<your username>
export ENDPOINT_PASSWORD=<your password>
export ENDPOINT_URL=<api endpoint url>
export SMB_SERVERNAME=<IP or DNS> # 192.168.1.10
export SMB_SHARENAME=<sharename> # The name of the Windows Share (not \\192.168.1.10\share, only share)
export SMB_USERNAME=<smb username> # without domain
export SMB_PASSWORD=<smb password>
export SMB_DOMAIN=<windows domain> # e.g. domain.local
export INTERVAL_SECONDS=<seconds> # Default set to 60

Docker

This docker run command deploys the post-handler without the smb access:

docker run -d -e ENDPOINT_USERNAME=<your username> \
-e ENDPOINT_PASSWORD=<your password> \
-e ENDPOINT_URL=<api endpoint> \
-e SMB_SERVERNAME=<IP or DNS> \
-e SMB_SHARENAME=<sharename> \
-e SMB_USERNAME=<smb username> \
-e SMB_PASSWORD=<smb password> \
-e SMB_DOMAIN=<windows domain> \
dockerbluestone/post-requester:latest
Docker-Compose
version: "3.9"  # optional since v1.27.0
services:
  post-requester:
    image: ghcr.io/natron.io/post-requester:latest
    environment:
      - ENDPOINT_USERNAME=username
      - ENDPOINT_PASSWORD=password
      - ENDPOINT_URL=https://api.test.com/upload
      - SMB_ENABLED=true
      - SMB_SERVERNAME=192.168.1.10
      - SMB_SHARENAME=share
      - SMB_USERNAME=username
      - SMB_PASSWORD=password
      - SMB_DOMAIN=domain.local
    networks: 
      - post-requester

networks:
  post-requester:
    driver: bridge

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package util sets up some basic utility functions
Package util sets up some basic utility functions

Jump to

Keyboard shortcuts

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