services

module
v0.0.0-...-c165996 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT

README

Services Example

Build

Build script
go build -ldflags "-X main.version="$(<VERSION)" -X main.date=`date "+%Y%m%d-%H%M%S"`"  ./cmd/service_example/.

Database

Create and start database
docker run -P --publish 127.0.0.1:5432:5432 --name service-example-db -e POSTGRES_USER=service-user -e POSTGRES_PASSWORD=service-password -e POSTGRES_DB=service-example -d library/postgres
Start
docker start service-example-db
Stop
docker stop service-example-db
Remove database
docker rm -f stop service-example-db

Directories

Path Synopsis
cmd
service_example command

Jump to

Keyboard shortcuts

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