From fb4cc305c21474749c47b644d9318ee1ddc1d1d3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 16 Jan 2025 23:29:43 +0100 Subject: [PATCH] Renamed landing page to portfolio and implemented config.yaml file for it --- group_vars/all | 2 +- playbook.servers.yml | 8 ++++---- roles/docker-landingpage/README.md | 2 -- roles/docker-portfolio/README.md | 2 ++ .../tasks/main.yml | 6 ++++++ .../templates/docker-compose.yml.j2 | 6 +++--- .../vars/main.yml | 4 ++-- 7 files changed, 18 insertions(+), 12 deletions(-) delete mode 100644 roles/docker-landingpage/README.md create mode 100644 roles/docker-portfolio/README.md rename roles/{docker-landingpage => docker-portfolio}/tasks/main.yml (63%) rename roles/{docker-landingpage => docker-portfolio}/templates/docker-compose.yml.j2 (78%) rename roles/{docker-landingpage => docker-portfolio}/vars/main.yml (51%) diff --git a/group_vars/all b/group_vars/all index 48c710ec..803029ce 100644 --- a/group_vars/all +++ b/group_vars/all @@ -146,7 +146,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_portfolio: "{{top_domain}}" domain_listmonk: "newsletter.{{top_domain}}" domain_mailu: "{{system_email_host}}" domain_mastodon: "microblog.{{top_domain}}" diff --git a/playbook.servers.yml b/playbook.servers.yml index 8ba03b5f..d48b7d6b 100644 --- a/playbook.servers.yml +++ b/playbook.servers.yml @@ -277,13 +277,13 @@ domain: "{{domain_friendica}}" http_port: 8028 -- name: setup landingpage - hosts: landingpage +- name: setup portfolio + hosts: portfolio become: true roles: - - role: docker-landingpage + - role: docker-portfolio vars: - domain: "{{domain_landingpage}}" + domain: "{{domain_portfolio}}" http_port: 8029 # Native Webserver Roles diff --git a/roles/docker-landingpage/README.md b/roles/docker-landingpage/README.md deleted file mode 100644 index 646cac15..00000000 --- a/roles/docker-landingpage/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# role docker-landingpage -create a landingpage with flask. Uses https://github.com/kevinveenbirkenbach/landingpage \ No newline at end of file diff --git a/roles/docker-portfolio/README.md b/roles/docker-portfolio/README.md new file mode 100644 index 00000000..9f3682c9 --- /dev/null +++ b/roles/docker-portfolio/README.md @@ -0,0 +1,2 @@ +# role docker-portfolio +create a portfolio with flask. Uses https://github.com/kevinveenbirkenbach/portfolio \ No newline at end of file diff --git a/roles/docker-landingpage/tasks/main.yml b/roles/docker-portfolio/tasks/main.yml similarity index 63% rename from roles/docker-landingpage/tasks/main.yml rename to roles/docker-portfolio/tasks/main.yml index 9d532bb7..662727c7 100644 --- a/roles/docker-landingpage/tasks/main.yml +++ b/roles/docker-portfolio/tasks/main.yml @@ -8,6 +8,12 @@ - name: "include tasks update-repository-with-docker-compose.yml" include_tasks: update-repository-with-docker-compose.yml +- name: create {{docker_compose_instance_directory}}/app/config.yaml + copy: + src: "{{ inventory_dir }}/files/{{ inventory_hostname }}/docker/app/portfolio/config.yaml" + dest: "{{docker_compose_instance_directory}}/app/config.yaml" + notify: docker compose project setup + - name: add docker-compose.yml template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml notify: docker compose project setup diff --git a/roles/docker-landingpage/templates/docker-compose.yml.j2 b/roles/docker-portfolio/templates/docker-compose.yml.j2 similarity index 78% rename from roles/docker-landingpage/templates/docker-compose.yml.j2 rename to roles/docker-portfolio/templates/docker-compose.yml.j2 index 3efd26c6..4cf0781b 100644 --- a/roles/docker-landingpage/templates/docker-compose.yml.j2 +++ b/roles/docker-portfolio/templates/docker-compose.yml.j2 @@ -1,10 +1,10 @@ services: - landingpage: + portfolio: build: context: . dockerfile: Dockerfile - image: application-landingpage - container_name: landingpage + image: application-portfolio + container_name: portfolio ports: - 127.0.0.1:{{http_port}}:5000 volumes: diff --git a/roles/docker-landingpage/vars/main.yml b/roles/docker-portfolio/vars/main.yml similarity index 51% rename from roles/docker-landingpage/vars/main.yml rename to roles/docker-portfolio/vars/main.yml index b2ea89de..2eeb2994 100644 --- a/roles/docker-landingpage/vars/main.yml +++ b/roles/docker-portfolio/vars/main.yml @@ -1,2 +1,2 @@ -docker_compose_project_name: "landingpage" -repository_address: "https://github.com/kevinveenbirkenbach/landingpage" +docker_compose_project_name: "portfolio" +repository_address: "https://github.com/kevinveenbirkenbach/portfolio"