File tree Expand file tree Collapse file tree 6 files changed +62
-2
lines changed Expand file tree Collapse file tree 6 files changed +62
-2
lines changed Original file line number Diff line number Diff line change 23
23
24
24
## Kubernetes MiniKube
25
25
26
- - Kubectl apply -f iac/docker/helm
27
- - minikube service ngnix --url
26
+ - Kubectl apply -f iac/docker/helm && Kubectl apply -f iac/docker/helm/nginx && Kubectl apply -f iac/docker/drupal && Kubectl apply -f iac/docker/mysql
27
+ - Add domain to local host i.e. /etc/host file
28
+ - minikube tunnel
Original file line number Diff line number Diff line change 4
4
$ config ['system.performance ' ]['js ' ]['preprocess ' ] = FALSE ;
5
5
6
6
$ settings ['config_sync_directory ' ] = '../config/sync ' ;
7
+
8
+ if (getenv ('K8S ' ) == '1 ' ) {
9
+ $ databases ['default ' ]['default ' ] = [
10
+ 'database ' => 'drupal ' ,
11
+ 'username ' => 'drupal_database_user ' ,
12
+ 'password ' => 'drupal_database_password ' ,
13
+ 'prefix ' => '' ,
14
+ 'host ' => 'mysql.default.svc.cluster.local:3306 ' ,
15
+ 'port ' => '3306 ' ,
16
+ 'isolation_level ' => 'READ COMMITTED ' ,
17
+ 'namespace ' => 'Drupal \\mysql \\Driver \\Database \\mysql ' ,
18
+ 'driver ' => 'mysql ' ,
19
+ 'autoload ' => 'core/modules/mysql/src/Driver/Database/mysql/ ' ,
20
+ ];
21
+ }
22
+
Original file line number Diff line number Diff line change 68
68
configMapKeyRef :
69
69
key : SITE_NAME
70
70
name : env
71
+ - name : KS
72
+ valueFrom :
73
+ configMapKeyRef :
74
+ key : KS
75
+ name : env
71
76
image : rishabgit/drupal-docker:php-fpm
72
77
name : drupal-fpm
73
78
resources : {}
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ annotations :
5
+ kompose.cmd : kompose convert
6
+ kompose.version : 1.26.0 (40646f47)
7
+ creationTimestamp : null
8
+ labels :
9
+ io.kompose.service : drupal-fpm
10
+ name : drupal-fpm
11
+ spec :
12
+ ports :
13
+ - name : " 9000"
14
+ port : 9000
15
+ targetPort : 9000
16
+ selector :
17
+ io.kompose.service : drupal-fpm
18
+ status :
19
+ loadBalancer : {}
Original file line number Diff line number Diff line change 8
8
MYSQL_ROOT_PASSWORD : root_password
9
9
MYSQL_USER : drupal_database_user
10
10
SITE_NAME : Drupal10
11
+ KS : " 1"
11
12
kind : ConfigMap
12
13
metadata :
13
14
creationTimestamp : null
Original file line number Diff line number Diff line change
1
+ apiVersion : networking.k8s.io/v1
2
+ kind : Ingress
3
+ metadata :
4
+ name : ngnix-ingress
5
+ annotations :
6
+ nginx.ingress.kubernetes.io/rewrite-target : /$1
7
+ spec :
8
+ rules :
9
+ - host : drupal-local.info
10
+ http :
11
+ paths :
12
+ - path : /
13
+ pathType : Prefix
14
+ backend :
15
+ service :
16
+ name : ngnix
17
+ port :
18
+ number : 8080
You can’t perform that action at this time.
0 commit comments