added env.local -- gitignored credentials file

This commit is contained in:
voje 2019-04-15 17:03:39 +02:00
parent 9e3254de8e
commit be9d525b1d
6 changed files with 23 additions and 6 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ src/frontend_vue/node_modules/
src/frontend_vue/dist/
dockerfiles/database/create.js
*__pycache__/
env.local

View File

@ -17,12 +17,9 @@ OUTPUT = "db"
OUTDIR = "/tmp/three" # if you're running this in docker, make sure to mount the volume
DBADDR = "0.0.0.0:27017" # don't use localhost
MONGOEXPRESS_USER = mxuser
MONGOEXPRESS_PASS = mxuserpassword
DB_ADM_USER = valadmin
DB_ADM_PASS = valadminpass
DB_USR_USER = valuser
DB_USR_PASS = valuserpass
# credentials from .gitignored file
# create it from env.default
include env.local
N_CORES = 1
export

View File

@ -10,6 +10,11 @@ $ git submodule update
## Components
### Credentials
Copy `env.default` to `env.local` (gitignored).
Modify database credentials in `env.local`.
The file is used by `make`.
### Database (2 containers)
Set db admin, user, pass, etc in 'Makefile'.

6
env.default Normal file
View File

@ -0,0 +1,6 @@
MONGOEXPRESS_USER = mxuser
MONGOEXPRESS_PASS = mxuserpassword
DB_ADM_USER = valadmin
DB_ADM_PASS = valadminpass
DB_USR_USER = valuser
DB_USR_PASS = valuserpass

7
test_make/Makefile Normal file
View File

@ -0,0 +1,7 @@
TEST_SECRET=default_secret
include env
export
test:
@echo $(TEST_SECRET)

1
test_make/env Normal file
View File

@ -0,0 +1 @@
TEST_SECRET=secret123