diff --git a/docker-compose.yml b/docker-compose.yml index 385c16f..0bdf162 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: - MARIADB_PASSWORD=password - MARIADB_ROOT_PASSWORD=root ports: - - "3306:3306" + - "13306:3306" volumes: - ./config/init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: @@ -26,4 +26,4 @@ services: env_file: - .env.development ports: - - "8055:8055" + - "18055:8055" diff --git a/knexfile.js b/knexfile.js index 02b00f1..ca17586 100644 --- a/knexfile.js +++ b/knexfile.js @@ -9,11 +9,11 @@ export default _.merge({}, ...[ 'development' ].map((environment) => { [environment]: { client: 'mysql', connection: { - host: 'localhost', - user: 'directus', - password: 'password', - database: 'directus', - port: 3306, + host: process.env.DB_HOST || 'localhost', + user: process.env.DB_USER || 'directus', + password: process.env.DB_PASSWORD || 'password', + database: process.env.DB_DATABSE || 'directus', + port: process.env.DB_PORT || 13306, }, pool: { min: 0, diff --git a/scripts/init.sh b/scripts/init.sh index 7831252..9526dc9 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -54,7 +54,7 @@ if [ "$is_dev_mode" = true ]; then docker compose up -d globalping-dash-directus - ./scripts/wait-for.sh -t 60 http://localhost:8055/admin/login + ./scripts/wait-for.sh -t 60 $DIRECTUS_URL/admin/login npm run seed else