Browse Source

added env.local -- gitignored credentials file

dev
voje 2 years ago
parent
commit
be9d525b1d
  1. 1
      .gitignore
  2. 9
      Makefile
  3. 5
      README.md
  4. 6
      env.default
  5. 7
      test_make/Makefile
  6. 1
      test_make/env

1
.gitignore

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

9
Makefile

@ -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

5
README.md

@ -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

@ -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

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

1
test_make/env

@ -0,0 +1 @@
TEST_SECRET=secret123
Loading…
Cancel
Save