mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
react-express-mysql: get version from mysql
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
parent
75aa52524c
commit
59724f87a1
8 changed files with 545 additions and 183 deletions
13
react-express-mysql/backend/src/config.js
vendored
13
react-express-mysql/backend/src/config.js
vendored
|
@ -1,5 +1,18 @@
|
|||
const fs = require("fs");
|
||||
|
||||
const readFileSync = filename => fs.readFileSync(filename).toString("utf8");
|
||||
|
||||
// Constants
|
||||
module.exports = {
|
||||
database: {
|
||||
host: process.env.DATABASE_HOST || "localhost",
|
||||
port: process.env.DATABASE_PORT,
|
||||
database: process.env.DATABASE_DB,
|
||||
user: process.env.DATABASE_USER,
|
||||
password: process.env.DATABASE_PASSWORD
|
||||
? readFileSync(process.env.DATABASE_PASSWORD)
|
||||
: null
|
||||
},
|
||||
port: process.env.PORT || 8080
|
||||
// if you're not using docker-compose for local development, this will default to 8080
|
||||
// to prevent non-root permission problems with 80. Dockerfile is set to make this 80
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue