- API
- CLI
- Scheduled job (either gocron or just cron)
- Run
go build -o main .
- Run
./main
set _VERSION $(cat VERSION)
- Run
docker build --tag silasbrack/go-project .
- Run
docker save silasbrack/go-project -o go-project.tar
- Run
aws s3 cp go-project.tar s3://silas-s3-bucket/container-registry/go-project.tar
- Run
rm go-project.tar
- Run
aws s3 cp s3://silas-s3-bucket/container-registry/go-project.tar .
- Run
cat go-project.tar | sudo docker load && rm go-project.tar
- Run
sudo docker container run -e host="db-postgresql-ams3-31352-do-user-17154797-0.a.db.ondigitalocean.com" -e user="doadmin" -e password="XXX" -e dbname="defaultdb" -e port="25060" -e sslmode="require" -e TimeZone="UTC" silasbrack/go-project:latest
PG_HOST
- host of postgres databasePG_USER
- username of postgres databasePG_PASSWORD
- password of postgres databasePG_DBNAME
- database name of postgres databasePG_PORT
- port of postgres databasePG_SSLMODE
- sslmode of postgres databasePG_TIMEZONE
- timezone of postgres databasePORT
- port to listen onLOG_DIR
- directory to store logs. If not set, logs will be written to stdout.