Skip to content

Commit

Permalink
adding dns entries (for tls maybe?)
Browse files Browse the repository at this point in the history
  • Loading branch information
JDeBo committed Jan 12, 2025
1 parent e50a096 commit ce23618
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# Git style
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: forbid-new-submodules
- id: no-commit-to-branch

# Common errors
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: CHANGELOG.md
- id: check-yaml
- id: check-merge-conflict
- id: check-executables-have-shebangs

- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shfmt
args: ['-l', '-i', '2', '-ci', '-sr', '-w']
- id: shellcheck
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.3
hooks:
- id: terraform_fmt
- id: terraform_docs
35 changes: 35 additions & 0 deletions scripts/docker-compose.wetty.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: '2'

# Sample docker compose file to demonstrate the usage of wetty behind a reverse
# proxy, optionally with Let's Encrypt based SSL certificate
#
# For SSL support, uncomment the commented lines. Consult traefik documentation
# for features like automatic forward from HTTP to HTTPS etc.

services:
wetty:
image: wettyoss/wetty
command:
- --base=/
- --ssh-host=ssh.example.com
labels:
- "traefik.enable=true"
- "traefik.http.routers.wetty.rule=Host(`wetty.example.com`)"
- "traefik.http.routers.wetty.tls.certResolver=default"
- "traefik.http.routers.wetty.tls=true"

reverse-proxy:
image: traefik
command:
- --providers.docker
# - --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --certificatesResolvers.default.acme.email=workshop@opensourcecorp.com
- --certificatesResolvers.default.acme.storage=acme.json
- --certificatesResolvers.default.acme.httpChallenge.entryPoint=web
ports:
# - "80:80"
- "443:443"

volumes:
- /var/run/docker.sock:/var/run/docker.sock
15 changes: 15 additions & 0 deletions terraform/dns.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

data "aws_route53_zone" "name" {
count = var.zone_name ? 1 : 0
name = var.zone_name

}

resource "aws_route53_record" "name" {
count = var.zone_name ? var.num_teams : 0
zone_id = data.aws_route53_zone.name[0].zone_id
name = "team-${count.index + 1}"
type = "A"
ttl = var.ttl
records = [aws_instance.instance[count.index].public_ip]
}
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "vpc" {
name = local.name
cidr = "10.0.0.0/16"

azs = [data.aws_availability_zones.available.names[0]]
azs = [data.aws_availability_zones.available.names]
public_subnets = ["10.0.1.0/24"]

enable_nat_gateway = false
Expand Down

0 comments on commit ce23618

Please sign in to comment.