Host website outside home

This commit is contained in:
Jake Howard 2020-04-26 14:26:48 +01:00
parent 36ed622a26
commit 7c6abc33fe
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 24 additions and 9 deletions

View file

@ -30,3 +30,7 @@
- hosts: intersect - hosts: intersect
roles: roles:
- intersect-docker - intersect-docker
- hosts: grimes
roles:
- website

View file

@ -40,9 +40,6 @@
- name: Install torrent - name: Install torrent
include: torrent.yml include: torrent.yml
- name: Install theorangeone.net
include: theorangeone.net.yml
- name: Install tt-rss - name: Install tt-rss
include: tt-rss.yml include: tt-rss.yml

View file

@ -1,4 +1,4 @@
- name: Create theorangeone.net directory - name: Create install directory
file: file:
path: /opt/theorangeone.net path: /opt/theorangeone.net
state: directory state: directory
@ -6,9 +6,9 @@
mode: "{{ docker_compose_directory_mask }}" mode: "{{ docker_compose_directory_mask }}"
become: true become: true
- name: Install theorangeone.net compose file - name: Install compose file
template: template:
src: files/theorangeone.net/docker-compose.yml src: files/docker-compose.yml
dest: /opt/theorangeone.net/docker-compose.yml dest: /opt/theorangeone.net/docker-compose.yml
mode: "{{ docker_compose_file_mask }}" mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}" owner: "{{ docker_user.name }}"
@ -16,7 +16,7 @@
register: compose_file register: compose_file
become: true become: true
- name: Cycle theorangeone.net container - name: Cycle container
docker_compose: docker_compose:
project_src: /opt/theorangeone.net project_src: /opt/theorangeone.net
pull: true pull: true

View file

@ -15,3 +15,17 @@ resource "vultr_firewall_rule" "grimes_ping" {
protocol = "icmp" protocol = "icmp"
network = "0.0.0.0/0" network = "0.0.0.0/0"
} }
resource "vultr_firewall_rule" "grimes_web" {
firewall_group_id = vultr_firewall_group.grimes.id
protocol = "tcp"
from_port = 80
network = "0.0.0.0/0"
}
resource "vultr_firewall_rule" "grimes_web_secure" {
firewall_group_id = vultr_firewall_group.grimes.id
protocol = "tcp"
from_port = 443
network = "0.0.0.0/0"
}

View file

@ -87,7 +87,7 @@ resource "cloudflare_record" "theorangeonenet_dkim_fm3" {
resource "cloudflare_record" "theorangeonenet_www" { resource "cloudflare_record" "theorangeonenet_www" {
zone_id = cloudflare_zone.theorangeonenet.id zone_id = cloudflare_zone.theorangeonenet.id
name = "www" name = "www"
value = vultr_server.casey.main_ip value = vultr_server.grimes.main_ip
type = "A" type = "A"
ttl = 1 ttl = 1
} }
@ -95,7 +95,7 @@ resource "cloudflare_record" "theorangeonenet_www" {
resource "cloudflare_record" "theorangeonenet_apex" { resource "cloudflare_record" "theorangeonenet_apex" {
zone_id = cloudflare_zone.theorangeonenet.id zone_id = cloudflare_zone.theorangeonenet.id
name = "@" name = "@"
value = vultr_server.casey.main_ip value = vultr_server.grimes.main_ip
type = "A" type = "A"
ttl = 1 ttl = 1
} }