Deploy web-rng

https://github.com/RealOrangeOne/web-rng
This commit is contained in:
Jake Howard 2020-05-17 18:04:44 +01:00
parent 323a3db478
commit 9850f73a17
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,11 @@
version: "2.3"
services:
web-rng:
image: docker.pkg.github.com/realorangeone/web-rng/web-rng:latest
container_name: web-rng
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.web-rng.rule=Host(`rng.theorangeone.net`)"
- "traefik.http.routers.web-rng.tls.certresolver=le"

View file

@ -43,5 +43,8 @@
- name: Install wallabag
include: wallabag.yml
- name: Install web-rng
include: web-rng.yml
- name: Install whoami
include: whoami.yml

View file

@ -0,0 +1,29 @@
- name: Create web-rng directory
file:
path: /opt/web-rng
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Install web-rng compose file
template:
src: files/web-rng/docker-compose.yml
dest: /opt/web-rng/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
register: compose_file
become: true
- name: Cycle web-rng container
docker_compose:
project_src: /opt/web-rng
pull: true
remove_orphans: true
remove_volumes: true
state: "{{ item }}"
when: compose_file.changed
loop:
- absent
- present

View file

@ -148,3 +148,11 @@ resource "cloudflare_record" "theorangeonenet_upload" {
type = "A"
ttl = 1
}
resource "cloudflare_record" "theorangeonenet_rng" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "rng"
value = vultr_server.casey.main_ip
type = "A"
ttl = 1
}