Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#518 Kubernetes Ingress scripts #602

Merged
merged 3 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "3"
services:
api:
bassa-api:
build: components/core/
ports:
- 5000:5000
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "3"
services:
api:
bassa-api:
build: components/core/
ports:
- 5000:5000
Expand Down
37 changes: 37 additions & 0 deletions scripts/kubernetes/bassa-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: bassa-api
labels:
run: bassa-api
spec:
selector:
matchLabels:
run: bassa-api
template:
metadata:
labels:
run: bassa-api
spec:
containers:
- name: bassa-api
image: scoreucsc/bassa
ports:
- containerPort: 5000
protocol: TCP
---
kind: Service
apiVersion: v1
metadata:
name: bassa-api
labels:
run: bassa-api
spec:
ports:
- protocol: TCP
port: 5000
targetPort: 5000
selector:
run: bassa-api
type: NodePort
17 changes: 17 additions & 0 deletions scripts/kubernetes/bassa-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: bassa-ingress
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: bassa-ui
servicePort: 80
- path: /api/*
backend:
serviceName: bassa-api
servicePort: 5000
37 changes: 37 additions & 0 deletions scripts/kubernetes/bassa-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: bassa-ui
labels:
run: bassa-ui
spec:
selector:
matchLabels:
run: bassa-ui
template:
metadata:
labels:
run: bassa-ui
spec:
containers:
- name: bassa-ui
image: scoreucsc/bassa-ui
ports:
- containerPort: 80
protocol: TCP
---
kind: Service
apiVersion: v1
metadata:
name: bassa-ui
labels:
run: bassa-ui
spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
selector:
run: bassa-ui
type: NodePort
2 changes: 1 addition & 1 deletion ui/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server {
location /api/ {
proxy_pass http://api:5000;
proxy_pass http://bassa-api:5000;
}
location / {
root /var/www/bassa;
Expand Down