Ver Fonte

add back reactive resume. (#129)

Dedy Martadinata S há 2 anos atrás
pai
commit
5e3563cc46

+ 8 - 0
build/info.json

@@ -296,6 +296,14 @@
 			"Exec": "bash",
 			"Description": "Install Invidious",
 			"wget": "https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_invidious.sh"
+		},
+                {
+			"File": "install_reactive-resume.sh",
+			"Type": "Preinstall",
+			"Exec": "bash",
+			"Doc": "reactive-resume_installation.md",
+			"Description": "Install Reactive-Resume",
+			"wget": "https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_reactive-resume.sh"
 		}
 	]
 }

+ 42 - 0
docs/reactive-resume_installation.md

@@ -0,0 +1,42 @@
+## Reactive Resume installation
+* Please run [install_reactive-resume.sh](https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/tools/install_reactive-resume.sh) before continuing installation
+
+### ENV descriptions
+This description stripped down from [official-docs](https://github.com/AmruthPillai/Reactive-Resume/blob/2f6072a7ba66d77a1f6682d70367f87323f2d70f/docs/docs/source-code/env-vars.mdx) as not everything used by this image.
+
+#### `TZ`
+* Required: `no`  
+* Default Value: `UTC`  
+* Description: Server Timezone
+
+#### `SECRET_KEY`
+* Required*: `yes`  
+* Description: Secret Key for Client-Server Communication, the secret key can be a unique key, a randomly generated string that is used for client-server communication. You can use this [random.org](https://www.random.org/strings/?num=10&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=html&rnd=new) configuration to generate a long unique string.
+
+#### `DATABASE_USERNAME`
+* Required: `yes`  
+* Default Value: `reactiveresume`  
+* Description: Username of the PostgreSQL Server
+
+#### `DATABASE_PASSWORD`
+* Required: `yes`  
+* Default Value: `reactiveresume`  
+* Description: Password of the PostgreSQL Server
+
+#### `JWT_SECRET`
+* Required: `yes`  
+* Description: Secret to Sign and Extract JWT Payloads, Similar to the `SECRET_KEY`, this can also be a unique generated string. This is used for email/password authentication, to hash + salt passwords stored in the database so they are unreadable.
+
+#### `GOOGLE_API_KEY`
+* Required: `no`  
+* Description: Google API Key used for fetching Google Fonts, within the resume builder, there's a section where you can pick any font from the Google Fonts Library. To fetch the names and IDs of these fonts, we depend on the Google Fonts API. It does not cost any payment, or the need to enter credit card information to create or use this API. You can get your own key here: [Google Webfonts API](https://developers.google.com/fonts/docs/developer_api). If you do not have a Google API Key, it was make use of the cached response JSON that's stored within the project source. Please note that this cache is not updated and may not have all the latest fonts that Google Fonts has to offer.
+
+#### `PUBLIC URL`
+* Required: `yes`
+* The URL where the web facing
+* Sample: http://ipaddress:port or https://somepublic.domain.tld
+
+#### `PUBLIC_SERVER_URL`
+* Required:`yes`
+* The URL where server processing
+* Sample: http://ipaddress:port or https://somepublicserver.domain.tld

+ 35 - 0
stack/reactive-resume.yml

@@ -0,0 +1,35 @@
+version: "2"
+services:
+  app:
+    image: martadinata666/reactive-resume:latest
+    restart: unless-stopped
+    environment:
+      - SECRET_KEY=${SECRET_KEY}
+      - POSTGRES_HOST=db
+      - POSTGRES_PORT=5432
+      - POSTGRES_USER=${DATABASE_USERNAME}
+      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
+      - POSTGRES_DB=reactiveresume
+      - JWT_SECRET=${JWT_SECRET}
+      - GOOGLE_API_KEY=${GOOGLE_API_KEY}
+      - PUBLIC_FLAG_DISABLE_SIGNUPS=${DISABLE_SIGNUPS}
+      - PUBLIC_URL=${PUBLIC_URL}
+      - PUBLIC_SERVER_URL=${PUBLIC_SERVER_URL}
+    volumes:
+      - /portainer/Files/AppData/Config/reactive-resume/uploads:/home/debian/reactiveresume/server/dist/assets/uploads
+      - /portainer/Files/AppData/Config/reactive-resume/exports:/home/debian/reactiveresume/server/dist/assets/exports
+    ports:
+      - ${CLIENT_PORT}:3000
+      - ${SERVER_PORT}:3100
+
+  db:
+    image: postgres:13
+    user: 1000:1000
+    environment:
+      - POSTGRES_USER=${DATABASE_USERNAME}
+      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
+      - POSTGRES_DB=reactiveresume
+    restart: always
+    volumes:
+      - /portainer/Files/AppData/Config/reactive-resume/db:/var/lib/postgresql/data
+

+ 90 - 0
template/apps/reactive-resume.json

@@ -0,0 +1,90 @@
+{
+	"categories": [
+		"Other",
+		"Tools"
+	],
+	"description": "A one-of-a-kind resume builder that's not out to get your data. Completely secure, customizable, portable, open-source and free forever.",
+	"image_arm64": "martadinata666/reactive-resume:latest",
+	"image_amd64": "martadinata666/reactive-resume:latest",
+	"logo": "https://raw.githubusercontent.com/pi-hosted/pi-hosted/master/images/reactiveresume.png",
+	"name": "reactive-resume",
+	"officialDoc": "https://hub.docker.com/r/martadinata666/reactive-resume",
+	"preInstallScript": "install_reactive-resume.sh",
+	"platform": "linux",
+	"env": [
+		{
+			"default": "some-random-alphanumeric123456",
+			"label": "SECRET_KEY",
+			"name": "SECRET_KEY"
+		},
+		{
+			"default": "some-random-alphanumeric123456",
+			"label": "JWT_SECRET",
+			"name": "JWT_SECRET"
+		},
+		{
+			"default": "reactiveresume",
+			"label": "DATABASE_USERNAME",
+			"name": "DATABASE_USERNAME"
+		},
+		{
+			"default": "reactiveresume",
+			"label": "DATABASE_PASSWORD",
+			"name": "DATABASE_PASSWORD"
+		},
+		{
+			"default": "use computer IP and Client port http://ip:7768",
+			"label": "PUBLIC_URL",
+			"name": "PUBLIC_URL"
+		},
+		{
+			"default": "use computer IP and Server port http://ip:7769",
+			"label": "PUBLIC_SERVER_URL",
+			"name": "PUBLIC_SERVER_URL"
+		},
+		{
+			"default": "leave blank to disable",
+			"label": "GOGLE_API_KEY",
+			"name": "GOOGLE_API_KEY"
+		},
+		{
+			"label": "DISABLE_SIGNUPS",
+			"name": "DISABLE_SIGNUPS",
+			"select": [
+				{
+					"default": true,
+					"text": "Disable user Signup",
+					"value": "false"
+				},
+				{
+					"text": "Allow user Signup",
+					"value": "true"
+				}
+			]
+		},
+		{
+			"default": "7768",
+			"label": "CLIENT_PORT",
+			"name": "CLIENT_PORT"
+		},
+		{
+			"default": "7769",
+			"label": "SERVER_PORT",
+			"name": "SERVER_PORT"
+		},
+		{
+			"default": "America/New_York",
+			"label": "TZ",
+			"name": "TZ"
+		}
+	],
+	"piHostedDoc": "reactive-resume_installation.md",
+	"repository": {
+		"stackfile_arm64": "stack/reactive-resume.yml",
+		"stackfile_amd64": "stack/reactive-resume.yml",
+		"url": "https://github.com/pi-hosted/pi-hosted"
+	},
+	"title": "Reactive-Resume",
+	"type": 3,
+	"webpage": "https://rxresu.me/"
+}

+ 28 - 0
tools/install_reactive-resume.sh

@@ -0,0 +1,28 @@
+#!/bin/bash
+
+function error {
+  echo -e "\\e[91m$1\\e[39m"
+  exit 1
+}
+
+function check_internet() {
+  printf "Checking if you are online..."
+  wget -q --spider http://github.com
+  if [ $? -eq 0 ]; then
+    echo "Online. Continuing."
+  else
+    error "Offline. Go connect to the internet then run the script again."
+  fi
+}
+
+check_internet
+
+echo "Creating directories..."
+sudo mkdir -p /portainer/Files/AppData/Config/reactive-resume/uploads || error "Failed to create Reactive-Resume uploads directory!"
+sudo mkdir -p /portainer/Files/AppData/Config/reactive-resume/exports || error "Failed to create Reactive-Resume exports directory!"
+sudo mkdir -p /portainer/Files/AppData/Config/reactive-resume/db || error "Failed to create Reactive-Resume database directory!"
+
+echo "Setting permissions..."
+sudo chown -R 1000:1000 /portainer/Files/AppData/Config/reactive-resume || error "Failed to set permissions!"
+
+echo "Done You are ready to install the Reactive-Resume stack"