rest-articles

command module
v0.0.0-...-ecdd535 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: AGPL-3.0 Imports: 1 Imported by: 0

README

rest-articles

Unit testing

Docker Postgres
Create Docker image
docker build - < Dockerfile_Postgres -t database
sudo docker run -d --name=co-postgres -p 5432:5432 -e POSTGRES_PASSWORD=thepassword postgres
Database Objects

Run migrations:

migrate -path migrations/ -database postgres://postgres:thepassword@127.0.0.1:5432/rest?sslmode=disable -verbose up 2

Prerequisites

Docker ( Compose )

Infrastructure

Use below command to create infrastructure:

make infra

Test Go Docker file

Create Docker image
sudo docker build -t goapp Dockerfile_GoApp
Create container from the Docker image created
sudo docker run -d --name=co-goapp -p 3000:3000 goapp

Resources

https://www.baeldung.com/ops/docker-compose
https://firehydrant.com/blog/develop-a-go-app-with-docker-compose/
https://stackoverflow.com/questions/52115178/create-a-database-then-table-with-dockerfile
https://golangbot.com/mysql-create-table-insert-row/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
domain
infra
db

Jump to

Keyboard shortcuts

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