Created
March 29, 2020 01:13
-
-
Save andersonkxiass/37cc47ed47359f618503038e9c72eef4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: wishapi | |
namespace: default | |
labels: | |
app: api | |
name: wishapi | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: api | |
task: wishapi | |
template: | |
metadata: | |
labels: | |
app: api | |
task: wishapi | |
spec: | |
containers: | |
- name: api | |
image: andersonkxiass/wishapi:latest | |
env: | |
- name: DB_URL | |
value: "host=postgres user=postgres dbname=wish_db password=pass sslmode=disable" | |
ports: | |
- containerPort: 8080 | |
restartPolicy: Always | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wishapi | |
namespace: default | |
spec: | |
selector: | |
app: api | |
task: wishapi | |
ports: | |
- name: http | |
port: 8080 | |
--- | |
apiVersion: traefik.containo.us/v1alpha1 | |
kind: IngressRoute | |
metadata: | |
name: api | |
namespace: default | |
spec: | |
entryPoints: | |
- web | |
routes: | |
- match: Host(`api.localhost`) | |
kind: Rule | |
services: | |
- name: wishapi | |
port: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment