go-commerce

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: GPL-3.0

README

GitHub Docker Pulls codecov

GoCommerce

KISS backend for an e-commerce

Configuration

GoCommerce can be configured in 2 ways:

  1. Create a file called config.yml in the same folder or the parent folder of the binary. See config.yml for an example.
  2. Set environment variables

If both are defined, the environment variables take precedence.

Config key Env variable Description Default value
Authentication.Username AUTH_USERNAME Basic auth username for the /admin paths
Authentication.Password AUTH_PASSWORD Basic auth password for the /admin paths
Database.Host DATABASE_HOST Hostname of the Postgres datatabase
Database.Port DATABASE_PORT Port of the Postgres datatabase 5432
Database.User DATABASE_USER Username for the Postgres datatabase
Database.Password DATABASE_PASSWORD Password for the Postgres datatabase
Database.Database DATABASE_DATABASE Database name for the Postgres datatabase
ImageProxy.BaseURL IMAGE_PROXY_BASE_URL Base URL of your Imgproxy instance /images/
ImageProxy.Key IMAGE_PROXY_KEY Signing key for Imgproxy
ImageProxy.Salt IMAGE_PROXY_SALT Salt for Imgproxy
ImageProxy.AllowedConfigs IMAGE_PROXY_ALLOWED_CONFIGS Comma-separated list of allowed image configs in format width:height:resizingType.
Example "100💯FILL,300:200:FIT". Use "*" if not limiting the configs.
Server.Port GOCOM_PORT HTTP port on which the GoCommerce API listens 8080
Storage.Images.Type STORAGE_IMAGES_TYPE Type of storage used for storing images. Currently only "fs" is supported. fs
Storage.Images.Path STORAGE_IMAGES_PATH Path for storing images ./files/images

Running locally

./dc-up.sh
cd api
go run .
./dc-down.sh

Directories

Path Synopsis
api
mocks
repositories
usecases
utils

Jump to

Keyboard shortcuts

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