Skip to content

Commit

Permalink
Updated envs
Browse files Browse the repository at this point in the history
  • Loading branch information
bashleigh committed Oct 1, 2018
1 parent 4f8cbf8 commit cae9d63
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
22 changes: 14 additions & 8 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
TYPEORM_CONNECTION=mysql
TYPEORM_HOST=db
TYPEORM_HOST=localhost
TYPEORM_PORT=3306
TYPEORM_USER=root
TYPEORM_PASS=root
TYPEORM_PASSWORD=root
TYPEORM_ENTITIES=src/entities/*.entity.ts
TYPEORM_SYNCHRONIZE=false
TYPEORM_LOGGING=false
TYPEORM_MIGRATIONS_RUN=false
TYPEORM_MIGRATIONS_DIR=migrations

DB_HOST=TYPEORM_HOST
DB_PORT=TYPEORM_PORT
DB_USER=TYPEORM_USER
DB_PASS=TYPEORM_PASS
DB_ENTITIES=TYPEORM_ENTITIES
DB_HOST=$TYPEORM_HOST
DB_PORT=$TYPEORM_PORT
DB_USER=$TYPEORM_USER
DB_PASSWORD=$TYPEORM_PASSWORD
DB_DATABASE=$TYPEORM_DATABASE
DB_ENTITIES=$TYPEORM_ENTITIES
DB_SYNCRONIZE=true
DB_LOGGING=true
DB_MIGRATIONS_RUN=true
DB_MIGRATIONS_DIR=TYPEORM_MIGRATIONS_DIR
DB_MIGRATIONS_DIR=$TYPEORM_MIGRATIONS_DIR

MYSQL_USER=$TYPEORM_USER
MYSQL_PASSWORD=$TYPEORM_PASSWORD
MYSQL_ROOT_PASSWORD=$TYPEORM_PASSWORD
MYSQL_DATABASE=$TYPEORM_DATABASE
3 changes: 2 additions & 1 deletion src/config/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export default {
type: 'mysql',
port: process.env.DB_PORT,
username: process.env.DB_USER,
password: process.env.DB_PASS,
password: process.env.DB_PASSWORD,
database: process.env.DB_DATABASE,
entities: process.env.DB_ENTITIES,
synchronize: process.env.DB_SYNCRONIZE === 'true',
logging: process.env.DB_LOGGING === 'true',
Expand Down

0 comments on commit cae9d63

Please sign in to comment.