diff --git a/config/database.php b/config/database.php index 8a9c595..f0b6dd4 100644 --- a/config/database.php +++ b/config/database.php @@ -46,11 +46,11 @@ 'mysql' => [ 'driver' => 'mysql', 'url' => env('DATABASE_URL'), - 'host' => getenv('DB_HOST', '127.0.0.1'), - 'port' => getenv('DB_PORT', '3306'), - 'database' => getenv('DB_DATABASE', 'forge'), - 'username' => getenv('DB_USERNAME', 'forge'), - 'password' => getenv('DB_PASSWORD', ''), + 'host' => env('DB_HOST', getenv('OPENSHIFT_MYSQL_DB_HOST')), + 'database' => env('DB_DATABASE', getenv('OPENSHIFT_APP_NAME')), + 'username' => env('DB_USERNAME', getenv('OPENSHIFT_MYSQL_DB_USERNAME')), + 'password' => env('DB_PASSWORD', getenv('OPENSHIFT_MYSQL_DB_PASSWORD')), + 'port' => env('DB_PORT', getenv('OPENSHIFT_MYSQL_DB_PORT')), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', diff --git a/openshift/config/06_sample-app.yaml b/openshift/config/06_sample-app.yaml index 0e85cbb..88db180 100644 --- a/openshift/config/06_sample-app.yaml +++ b/openshift/config/06_sample-app.yaml @@ -26,27 +26,27 @@ spec: configMapKeyRef: name: sample-config key: database-type - - name: DB_HOST + - name: OPENSHIFT_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: sample-config key: database-host - - name: DB_PORT + - name: OPENSHIFT_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: sample-config key: database-port-number - - name: DB_DATABASE + - name: OPENSHIFT_APP_NAME valueFrom: configMapKeyRef: name: sample-config key: database-name - - name: DB_USERNAME + - name: OPENSHIFT_MYSQL_DB_USERNAME valueFrom: configMapKeyRef: name: mariadb-config key: mariadb-user - - name: DB_PASSWORD + - name: OPENSHIFT_MYSQL_DB_PASSWORD valueFrom: secretKeyRef: name: mariadb-secret diff --git a/openshift/config/11_sample_whitlist.yaml b/openshift/config/11_sample_whitlist.yaml new file mode 100644 index 0000000..8a9a7db --- /dev/null +++ b/openshift/config/11_sample_whitlist.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: sample-whitelist + namespace: uu-0219959 + labels: + app: fsw-sample-app + app.kubernetes.io/part-of: fsw-sample-app + annotations: + haproxy.router.openshift.io/ip_whitelist: "131.211.0.0/16" +spec: + host: app.openshift.fss.uu.nl + to: + name: nginx + diff --git a/openshift/openshift.env b/openshift/openshift.env index 3c8a98e..ca1c81b 100644 --- a/openshift/openshift.env +++ b/openshift/openshift.env @@ -9,11 +9,6 @@ LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug DB_CONNECTION=mysql -DB_HOST=mariadb-sample -DB_PORT=3306 -DB_DATABASE=development -DB_USERNAME=development -DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file