Revize 0319d5a2
Přidáno uživatelem Jakub Šmíd před asi 3 roky(ů)
backend/app-deployment.yaml | ||
---|---|---|
30 | 30 |
image: app |
31 | 31 |
name: app-backend |
32 | 32 |
ports: |
33 |
- containerPort: 8080
|
|
33 |
- containerPort: 8000
|
|
34 | 34 |
resources: {} |
35 | 35 |
restartPolicy: Always |
36 | 36 |
status: {} |
backend/app-service.yaml | ||
---|---|---|
10 | 10 |
name: app |
11 | 11 |
spec: |
12 | 12 |
ports: |
13 |
- name: "8080"
|
|
14 |
port: 8080
|
|
15 |
targetPort: 8080
|
|
13 |
- name: "8000"
|
|
14 |
port: 8000
|
|
15 |
targetPort: 8000
|
|
16 | 16 |
selector: |
17 | 17 |
io.kompose.service: app |
18 | 18 |
status: |
backend/db-deployment.yaml | ||
---|---|---|
13 | 13 |
selector: |
14 | 14 |
matchLabels: |
15 | 15 |
io.kompose.service: db |
16 |
strategy: {} |
|
16 |
strategy: |
|
17 |
type: Recreate |
|
17 | 18 |
template: |
18 | 19 |
metadata: |
19 | 20 |
annotations: |
... | ... | |
35 | 36 |
name: postgres-db |
36 | 37 |
ports: |
37 | 38 |
- containerPort: 5432 |
38 |
resources: {} |
|
39 |
resources: { } |
|
40 |
volumeMounts: |
|
41 |
- mountPath: /var/lib/postgresql/data |
|
42 |
name: db-data |
|
39 | 43 |
restartPolicy: Always |
44 |
volumes: |
|
45 |
- name: db-data |
|
46 |
persistentVolumeClaim: |
|
47 |
claimName: db-data |
|
40 | 48 |
status: {} |
backend/docker-compose.yml | ||
---|---|---|
12 | 12 |
- 5432 |
13 | 13 |
ports: |
14 | 14 |
- "5432:5432" # expose port 5432 (PostgreSQL) out of the docker container to the local machine |
15 |
volumes: |
|
16 |
- db-data:/var/lib/postgresql/data |
|
15 | 17 |
|
16 | 18 |
|
17 | 19 |
app: # Spring boot application |
18 | 20 |
build: . |
19 | 21 |
container_name: app-backend # name of the container |
20 | 22 |
ports: |
21 |
- "8080:8080" # expose port 8080 out of the docker container do the local machine
|
|
23 |
- "8000:8000" # expose port 8080 out of the docker container do the local machine
|
|
22 | 24 |
depends_on: |
23 | 25 |
- db |
24 | 26 |
environment: |
25 | 27 |
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/test # overwrites application.properties datasource url to connect to the database |
26 | 28 |
|
29 |
frontend: |
|
30 |
# Since our Dockerfile for web-server is located in react-app foler, our build context is ./react-app |
|
31 |
build: ../frontend |
|
32 |
container_name: frontend |
|
33 |
image: schwobik/frontend-app:1.0 |
|
34 |
ports: |
|
35 |
- "8080:8080" |
|
36 |
|
|
27 | 37 |
volumes: |
28 | 38 |
db-data: |
backend/frontend-deployment.yaml | ||
---|---|---|
1 |
apiVersion: apps/v1 |
|
2 |
kind: Deployment |
|
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: frontend |
|
10 |
name: frontend |
|
11 |
spec: |
|
12 |
replicas: 1 |
|
13 |
selector: |
|
14 |
matchLabels: |
|
15 |
io.kompose.service: frontend |
|
16 |
strategy: { } |
|
17 |
template: |
|
18 |
metadata: |
|
19 |
annotations: |
|
20 |
kompose.cmd: kompose convert |
|
21 |
kompose.version: 1.26.0 (40646f47) |
|
22 |
creationTimestamp: null |
|
23 |
labels: |
|
24 |
io.kompose.service: frontend |
|
25 |
spec: |
|
26 |
containers: |
|
27 |
- image: schwobik/frontend-app:1.0 |
|
28 |
name: frontend |
|
29 |
ports: |
|
30 |
- containerPort: 8080 |
|
31 |
resources: { } |
|
32 |
restartPolicy: Always |
|
33 |
status: { } |
backend/frontend-service.yaml | ||
---|---|---|
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: frontend |
|
10 |
name: frontend |
|
11 |
spec: |
|
12 |
ports: |
|
13 |
- name: "8080" |
|
14 |
port: 8080 |
|
15 |
targetPort: 8080 |
|
16 |
selector: |
|
17 |
io.kompose.service: frontend |
|
18 |
status: |
|
19 |
loadBalancer: { } |
Také k dispozici: Unified diff
Configuration files for kubernetes
re #9333