Skip to content

Commit

Permalink
course files
Browse files Browse the repository at this point in the history
  • Loading branch information
AdautoDCJunior committed Feb 5, 2023
0 parents commit 5249157
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# VSCODE
.vscode
8 changes: 8 additions & 0 deletions db-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: db-configmap
data:
MYSQL_ROOT_PASSWORD: '123456'
MYSQL_DATABASE: 'empresa'
MYSQL_PASSWORD: '123456'
15 changes: 15 additions & 0 deletions db-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: db-noticias
labels:
app: db-noticias
spec:
containers:
- name: db-noticias-container
image: aluracursos/mysql-db:1
ports:
- containerPort: 3306
envFrom:
- configMapRef:
name: db-configmap
6 changes: 6 additions & 0 deletions portal-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: portal-configmap
data:
IP_SISTEMA: http://127.0.0.1:33385
15 changes: 15 additions & 0 deletions portal-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: portal-noticias
labels:
app: portal-noticias
spec:
containers:
- name: portal-noticias-container
image: aluracursos/portal-noticias:1
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: portal-configmap
9 changes: 9 additions & 0 deletions sistema-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sistema-configmap
data:
HOST_DB: 'svc-db-noticias:3306'
USER_DB: 'root'
PASS_DB: '123456'
DATABASE_DB: 'empresa'
15 changes: 15 additions & 0 deletions sistema-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: sistema-noticias
labels:
app: sistema-noticias
spec:
containers:
- name: sistema-noticias-container
image: aluracursos/sistema-noticias:1
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: sistema-configmap
10 changes: 10 additions & 0 deletions svc-db-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: svc-db-noticias
spec:
type: ClusterIP
selector:
app: db-noticias
ports:
- port: 3306
12 changes: 12 additions & 0 deletions svc-portal-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: svc-portal-noticias
spec:
type: NodePort
selector:
app: portal-noticias
ports:
- port: 80
#target: 80
nodePort: 30000 #30000 - 32702
11 changes: 11 additions & 0 deletions svc-sistema-noticias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: svc-sistema-noticias
spec:
type: NodePort
selector:
app: sistema-noticias
ports:
- port: 80
nodePort: 30001

0 comments on commit 5249157

Please sign in to comment.