Comments (1)
I don't think it's a good idea to remove .env file completely. It is a two-part file, created from globalenv.tmpl and a specific DB template. Maybe we can remove the DB-specific variables. If we keep the current configuration, that's good, or alternatively, we could remove the .env.example and bind default variables in .env so that Docker Compose works out of the box.
What do you think is the best approach?
#global
PORT=8080
APP_ENV=local
#DB specific
DB_HOST=
DB_PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_ROOT_PASSWORD=
This is core logic for .env
case "env":
if p.DBDriver != "none" {
envBytes := [][]byte{
tpl.GlobalEnvTemplate(),
p.DBDriverMap[p.DBDriver].templater.Env(),
}
createdTemplate := template.Must(template.New(fileName).Parse(string(bytes.Join(envBytes, []byte("\n")))))
err = createdTemplate.Execute(createdFile, p)
} else {
createdTemplate := template.Must(template.New(fileName).Parse(string(tpl.GlobalEnvTemplate())))
err = createdTemplate.Execute(createdFile, p)
}
from go-blueprint.
Related Issues (20)
- [Feature Request] Using pgx instead of pq HOT 2
- [Bug] Remove Homebrew Installation HOT 3
- Looking for a Core Maintainer HOT 5
- [Bug] Update the README HOT 1
- [Feature Request] Using modernc.org/sqlite driver
- [Bug] Spinner not working HOT 1
- [Feature Request] --advanced flag for additional step options HOT 6
- [Feature Request] Add option to use auth using go-auth HOT 1
- [Feature Request]: Wiki for new Go Developers HOT 3
- [Bug] chi not visible but selection works HOT 4
- [Feature Request] DB Migration & Cobra as a control mechanism HOT 11
- [Bug] Error committing files to git repo: exit status 128 HOT 9
- [Feature Request] Adding go-fx support for DI pattern with existing frameworks. HOT 2
- 📋 Project Documentation 📋 HOT 1
- [Bug] go-blueprint command isn't added globally HOT 1
- add it to more package managers
- [Feature Request] Create a WEB UI component that can spin everything up for a user HOT 8
- [Question] Application listening for events instead of receiving http requests HOT 2
- [Bug] Using Air and templ (hot/live-reloading doesn't work) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-blueprint.