mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-02-22 12:29:39 +01:00
Implemented basic landingpage integration
This commit is contained in:
parent
9cd2424c0e
commit
e73da1e2ec
@ -131,6 +131,7 @@ domain_friendica: "friendica.{{top_domain}}"
|
||||
domain_funkwhale: "music.{{top_domain}}"
|
||||
domain_gitea: "git.{{top_domain}}"
|
||||
domain_gitlab: "gitlab.{{top_domain}}"
|
||||
domain_landingpage: "{{top_domain}}"
|
||||
domain_listmonk: "newsletter.{{top_domain}}"
|
||||
domain_mailu: "mail.{{top_domain}}"
|
||||
domain_mastodon: "microblog.{{top_domain}}"
|
||||
|
@ -277,6 +277,15 @@
|
||||
domain: "{{domain_friendica}}"
|
||||
http_port: 8028
|
||||
|
||||
- name: setup landingpage
|
||||
hosts: landingpage
|
||||
become: true
|
||||
roles:
|
||||
- role: docker-landingpage
|
||||
vars:
|
||||
domain: "{{domain_landingpage}}"
|
||||
http_port: 8029
|
||||
|
||||
# Native Webserver Roles
|
||||
- name: setup nginx-homepages
|
||||
hosts: homepage
|
||||
|
2
roles/docker-landingpage/README.md
Normal file
2
roles/docker-landingpage/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# role docker-landingpage
|
||||
create a landingpage with flask. Uses https://github.com/kevinveenbirkenbach/landingpage
|
13
roles/docker-landingpage/tasks/main.yml
Normal file
13
roles/docker-landingpage/tasks/main.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
- name: "include docker/compose/common.yml"
|
||||
include_tasks: docker/compose/common.yml
|
||||
|
||||
- name: "include tasks nginx-docker-proxy-domain.yml"
|
||||
include_tasks: nginx-docker-proxy-domain.yml
|
||||
|
||||
- name: "include tasks update-repository-with-docker-compose.yml"
|
||||
include_tasks: update-repository-with-docker-compose.yml
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
notify: docker compose project setup
|
15
roles/docker-landingpage/templates/docker-compose.yml.j2
Normal file
15
roles/docker-landingpage/templates/docker-compose.yml.j2
Normal file
@ -0,0 +1,15 @@
|
||||
services:
|
||||
landingpage:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: application-landingpage
|
||||
container_name: landingpage
|
||||
ports:
|
||||
- 127.0.0.1:{{http_port}}:5000
|
||||
volumes:
|
||||
- ./app:/app
|
||||
restart: unless-stopped
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker/compose/networks.yml.j2' %}
|
2
roles/docker-landingpage/vars/main.yml
Normal file
2
roles/docker-landingpage/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
docker_compose_project_name: "landingpage"
|
||||
repository_address: "https://github.com/kevinveenbirkenbach/landingpage"
|
@ -1,4 +1,4 @@
|
||||
- name: "backup docker-compose.yml if it exists"
|
||||
- name: "backup detached files"
|
||||
command: >
|
||||
mv "{{docker_compose_instance_directory}}{{ item }}" "/tmp/{{docker_compose_project_name}}-{{ item }}.backup"
|
||||
args:
|
||||
@ -21,7 +21,7 @@
|
||||
notify: docker compose project setup
|
||||
become: true
|
||||
|
||||
- name: "restore docker-compose.yml from backup"
|
||||
- name: "restore detached files"
|
||||
command: >
|
||||
mv "/tmp/{{docker_compose_project_name}}-{{ item }}.backup" "{{docker_compose_instance_directory}}{{ item }}"
|
||||
args:
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This template needs to be included in docker-compose.yml
|
||||
networks:
|
||||
{% if enable_central_database | bool %}
|
||||
{% if enable_central_database | bool and database_type is defined %}
|
||||
central_{{ database_type }}:
|
||||
external: true
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This template needs to be included in docker-compose.yml containers
|
||||
networks:
|
||||
{% if enable_central_database | bool %}
|
||||
{% if enable_central_database | bool and database_type is defined %}
|
||||
central_{{ database_type }}:
|
||||
{% endif %}
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user