Commit 3cefbbbd authored by Somnath Ghorpade's avatar Somnath Ghorpade
Browse files

added gitignore file and also changes config path in compose file.

parent 8d215c20
1 merge request!2added gitignore file and also changes config path in compose file.
Showing with 13 additions and 4 deletions
logs/
servers/logs/
servers/configs/database.json
configs/database.json
\ No newline at end of file
...@@ -52,6 +52,13 @@ Golang Gin web framework template project ...@@ -52,6 +52,13 @@ Golang Gin web framework template project
Note: All Immudb operations' result is in Base64 format. Note: All Immudb operations' result is in Base64 format.
## Docker usage
```
To run project on your local please follow steps
- Kindly install docker and docker-compose latest version on your local machine
- Run command docker-compose up on you command prompt
```
## database json format ## database json format
......
version: '3' version: '3'
services: services:
gogintemplate: gogintemplate:
build: build:
...@@ -9,4 +8,4 @@ services: ...@@ -9,4 +8,4 @@ services:
- "3000:3000" - "3000:3000"
volumes: volumes:
- ./logs:/application/logs - ./logs:/application/logs
- ./configs:/application/configs - ./configs:/application/servers/configs
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"golangtemplate/servers/common" "golangtemplate/servers/common"
"golangtemplate/servers/middleware" "golangtemplate/servers/middleware"
"golangtemplate/servers/routes" "golangtemplate/servers/routes"
"io/ioutil"
"net" "net"
"os" "os"
"path/filepath" "path/filepath"
...@@ -108,7 +107,7 @@ func initializeAll(g *gin.Engine) error { ...@@ -108,7 +107,7 @@ func initializeAll(g *gin.Engine) error {
routes.Init(g) routes.Init(g)
// read file and initialise mongo connection // read file and initialise mongo connection
content, err := ioutil.ReadFile(models.ConfigPath) content, err := os.ReadFile(models.ConfigPath)
if err != nil { if err != nil {
loggermdl.LogError(err) loggermdl.LogError(err)
return err return err
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment