Skip to content

Commit

Permalink
Add database credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
dasscheman committed Jun 24, 2024
1 parent abef788 commit f9ab309
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
10 changes: 5 additions & 5 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 5 additions & 5 deletions openshift/config/06_sample-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions openshift/config/11_sample_whitlist.yaml
Original file line number Diff line number Diff line change
@@ -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

5 changes: 0 additions & 5 deletions openshift/openshift.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f9ab309

Please sign in to comment.