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: postgres-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: postgres | |
template: |
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: api-deployment | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
component: api | |
template: |
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: postgres-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: postgres | |
template: |
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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: ingress-service | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
spec: | |
rules: | |
- http: |
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
provider "aws" { | |
region = "us-east-1" # Change as needed | |
} | |
resource "aws_s3_bucket" "static_site" { | |
bucket = "my-static-site-bucket" # Change to a unique bucket name | |
} | |
resource "aws_s3_bucket_website_configuration" "static_site" { | |
bucket = aws_s3_bucket.static_site.id |
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
module.exports = async function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
const location = req.query.location | |
const response = await fetch(`https://wttr.in/${location}?format=j1`) | |
//context.log(response) | |
const data = await response.json() | |
context.log(data) |
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: postgres-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
component: postgres | |
template: |
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
services: | |
db: | |
image: postgres:12 | |
container_name: notes-db-dev | |
volumes: | |
- db-data2:/var/lib/postgresql/data | |
environment: | |
POSTGRES_DB: notesdb | |
POSTGRES_PASSWORD: secret | |
networks: |
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
services: | |
db: | |
image: postgres:12 | |
container_name: notes-db-dev | |
volumes: | |
- db-data:/var/lib/postgresql/data | |
environment: | |
POSTGRES_DB: notesdb | |
POSTGRES_PASSWORD: secret | |
api: |
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
#1 wir erstelen das Volumen und Network | |
docker volume create notes-db-data | |
docker network create notes-api-network | |
#2 wir starten den db container | |
docker container run \ | |
--detach \ | |
--name=notes-db \ | |
--volume notes-db-data:/var/lib/postgresql/data \ |
NewerOlder