Skip to content

Commit ce23618

Browse files
committed
adding dns entries (for tls maybe?)
1 parent e50a096 commit ce23618

4 files changed

Lines changed: 82 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
# Git style
6+
- id: check-added-large-files
7+
- id: check-merge-conflict
8+
- id: check-vcs-permalinks
9+
- id: forbid-new-submodules
10+
- id: no-commit-to-branch
11+
12+
# Common errors
13+
- id: end-of-file-fixer
14+
- id: trailing-whitespace
15+
args: [--markdown-linebreak-ext=md]
16+
exclude: CHANGELOG.md
17+
- id: check-yaml
18+
- id: check-merge-conflict
19+
- id: check-executables-have-shebangs
20+
21+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
22+
rev: 3.0.0
23+
hooks:
24+
- id: shfmt
25+
args: ['-l', '-i', '2', '-ci', '-sr', '-w']
26+
- id: shellcheck
27+
- repo: https://github.com/antonbabenko/pre-commit-terraform
28+
rev: v1.96.3
29+
hooks:
30+
- id: terraform_fmt
31+
- id: terraform_docs

scripts/docker-compose.wetty.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: '2'
2+
3+
# Sample docker compose file to demonstrate the usage of wetty behind a reverse
4+
# proxy, optionally with Let's Encrypt based SSL certificate
5+
#
6+
# For SSL support, uncomment the commented lines. Consult traefik documentation
7+
# for features like automatic forward from HTTP to HTTPS etc.
8+
9+
services:
10+
wetty:
11+
image: wettyoss/wetty
12+
command:
13+
- --base=/
14+
- --ssh-host=ssh.example.com
15+
labels:
16+
- "traefik.enable=true"
17+
- "traefik.http.routers.wetty.rule=Host(`wetty.example.com`)"
18+
- "traefik.http.routers.wetty.tls.certResolver=default"
19+
- "traefik.http.routers.wetty.tls=true"
20+
21+
reverse-proxy:
22+
image: traefik
23+
command:
24+
- --providers.docker
25+
# - --entryPoints.web.address=:80
26+
- --entryPoints.websecure.address=:443
27+
- --certificatesResolvers.default.acme.email=workshop@opensourcecorp.com
28+
- --certificatesResolvers.default.acme.storage=acme.json
29+
- --certificatesResolvers.default.acme.httpChallenge.entryPoint=web
30+
ports:
31+
# - "80:80"
32+
- "443:443"
33+
34+
volumes:
35+
- /var/run/docker.sock:/var/run/docker.sock

terraform/dns.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
data "aws_route53_zone" "name" {
3+
count = var.zone_name ? 1 : 0
4+
name = var.zone_name
5+
6+
}
7+
8+
resource "aws_route53_record" "name" {
9+
count = var.zone_name ? var.num_teams : 0
10+
zone_id = data.aws_route53_zone.name[0].zone_id
11+
name = "team-${count.index + 1}"
12+
type = "A"
13+
ttl = var.ttl
14+
records = [aws_instance.instance[count.index].public_ip]
15+
}

terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module "vpc" {
2020
name = local.name
2121
cidr = "10.0.0.0/16"
2222

23-
azs = [data.aws_availability_zones.available.names[0]]
23+
azs = [data.aws_availability_zones.available.names]
2424
public_subnets = ["10.0.1.0/24"]
2525

2626
enable_nat_gateway = false

0 commit comments

Comments
 (0)