topic/cleaning #4

Merged
shah merged 23 commits from topic/cleaning into master 2022-05-31 14:53:59 +00:00
3 changed files with 5 additions and 6 deletions
Showing only changes of commit 4c2414fa0a - Show all commits

View file

@ -1,8 +1,8 @@
build:
docker-compose build
run: build
docker-compose up
run:
COMPOSE_PROJECT_NAME=genitywebapp docker-compose up --build
build-binary:
GOOS=linux GOARCH=amd64 go build

View file

@ -1,10 +1,10 @@
version: "3.8"
version: "3"
services:
db:
image: postgres
env_file: ./configs/db.env
volumes:
- ./db_postgres:/var/lib/postgresql/data
- db_postgres:/var/lib/postgresql/data
- ./scripts/db/ddl_01.sql:/docker-entrypoint-initdb.d/10_schema.sql
- ./scripts/db/dml_01.sql:/docker-entrypoint-initdb.d/20_insert.sql
expose:

View file

@ -30,7 +30,6 @@ func main() {
}
func initDb() {
config := dbConfig()
var err error
@ -52,7 +51,7 @@ func initDb() {
func dbConfig() map[string]string {
conf := make(map[string]string)
conf[dbhost] = "POC-golang-postgres-docker_db_1"
conf[dbhost] = "genitywebapp_db_1"
conf[dbport] = "5432"
conf[dbuser] = "root_user"
conf[dbpass] = "shahzad12"