Skip to content

Commit

Permalink
✨ Add Open-resume (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
anarion80 authored May 6, 2024
1 parent cabe293 commit 40b08bf
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ If you have a spare domain name you can configure applications to be accessible
* [Openbooks](https://github.com/evan-buss/openbooks) - Search and Download eBooks
* [openHAB](https://www.openhab.org/) - A vendor and technology agnostic open source automation software for your home
* [openLDAP](https://www.openldap.org/) - An open source implementation of the Lightweight Directory Access Protocol
* [Open-resume](https://github.com/xitanggg/open-resume) - A powerful open-source resume builder and resume parser
* [Organizr](https://organizr.app/) - ORGANIZR aims to be your one stop shop for your Servers Frontend.
* [Outline](https://github.com/outline/outline) - The fastest knowledge base for growing teams.
* [Overleaf](https://github.com/overleaf/overleaf) - A web-based collaborative LaTeX editor
Expand Down
4 changes: 4 additions & 0 deletions nas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@
tags:
- openldap

- role: open-resume
tags:
- openresume

- role: organizr
tags:
- organizr
Expand Down
20 changes: 20 additions & 0 deletions roles/open-resume/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
openresume_enabled: false
openresume_available_externally: false

# directories
openresume_data_directory: "{{ docker_home }}/openresume"

# network
openresume_port: "3017"
openresume_hostname: "openresume"

# specs
openresume_memory: 1g

# docker
openresume_container_name: openresume
openresume_image_name: zottelchen/open-resume
openresume_image_version: latest
openresume_user_id: "1000"
openresume_group_id: "1000"
11 changes: 11 additions & 0 deletions roles/open-resume/docs/openresume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Open-resume

Homepage: [https://github.com/xitanggg/open-resume](https://github.com/xitanggg/open-resume)

OpenResume is a powerful open-source resume builder and resume parser.

## Usage

Set `openresume_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

Open-resume web interface can be found at [http://ansible_nas_host_or_ip:3017](http://ansible_nas_host_or_ip:3017).
6 changes: 6 additions & 0 deletions roles/open-resume/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
provisioner:
inventory:
group_vars:
all:
openresume_enabled: true
10 changes: 10 additions & 0 deletions roles/open-resume/molecule/default/side_effect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Stop
hosts: all
become: true
tasks:
- name: "Include {{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }} role"
ansible.builtin.include_role:
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"
vars:
openresume_enabled: false
19 changes: 19 additions & 0 deletions roles/open-resume/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Get openresume container state
community.docker.docker_container:
name: "{{ openresume_container_name }}"
register: result

- name: Check if openresume containers are running
ansible.builtin.assert:
that:
- result.container['State']['Status'] == "running"
- result.container['State']['Restarting'] == false
19 changes: 19 additions & 0 deletions roles/open-resume/molecule/default/verify_stopped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Include vars
ansible.builtin.include_vars:
file: ../../defaults/main.yml

- name: Try and stop and remove openresume
community.docker.docker_container:
name: "{{ openresume_container_name }}"
state: absent
register: result

- name: Check if openresume is stopped
ansible.builtin.assert:
that:
- not result.changed
1 change: 1 addition & 0 deletions roles/open-resume/requirements.yml
42 changes: 42 additions & 0 deletions roles/open-resume/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
- name: Start Open-resume
block:
- name: Create Open-resume Directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
with_items:
- "{{ openresume_data_directory }}"

- name: Create Open-resume Docker Container
community.docker.docker_container:
container_default_behavior: no_defaults
name: "{{ openresume_container_name }}"
image: "{{ openresume_image_name }}:{{ openresume_image_version }}"
pull: true
volumes:
- "{{ openresume_data_directory }}/data:/data:rw"
ports:
- "{{ openresume_port }}:3000"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ openresume_user_id | quote }}"
PGID: "{{ openresume_group_id | quote }}"
restart_policy: unless-stopped
memory: "{{ openresume_memory }}"
labels:
traefik.enable: "{{ openresume_available_externally | string }}"
traefik.http.routers.openresume.rule: "Host(`{{ openresume_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.openresume.tls.certresolver: "letsencrypt"
traefik.http.routers.openresume.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.openresume.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.openresume.loadbalancer.server.port: "3000"
when: openresume_enabled is true

- name: Stop Open-resume
block:
- name: Stop Open-resume
community.docker.docker_container:
name: "{{ openresume_container_name }}"
state: absent
when: openresume_enabled is false
14 changes: 14 additions & 0 deletions website/docs/applications/other/openresume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: "Open-resume"
description: "A powerful open-source resume builder and resume parser"
---

Homepage: [https://github.com/xitanggg/open-resume](https://github.com/xitanggg/open-resume)

OpenResume is a powerful open-source resume builder and resume parser.

## Usage

Set `openresume_enabled: true` in your `inventories/<your_inventory>/group_vars/nas.yml` file.

Open-resume web interface can be found at [http://ansible_nas_host_or_ip:3017](http://ansible_nas_host_or_ip:3017).

0 comments on commit 40b08bf

Please sign in to comment.