Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nodejs/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "geerlingguy/rockylinux8"
config.vm.box = "geerlingguy/rockylinux10"
config.vm.hostname = "nodejs.test"
config.vm.network "private_network", ip: "192.168.56.55"
config.ssh.insert_key = false
Expand Down
1 change: 1 addition & 0 deletions nodejs/provisioning/app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "examplenodeapp",
"version": "1.0.0",
"description": "Example Express Node.js app.",
"author": "Jeff Geerling <geerlingguy@mac.com>",
"dependencies": {
Expand Down
14 changes: 2 additions & 12 deletions nodejs/provisioning/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
- name: Install EPEL repo.
dnf: name=epel-release state=present

- name: Import Remi GPG key.
rpm_key:
key: "https://rpms.remirepo.net/RPM-GPG-KEY-remi2018"
state: present

- name: Install Remi repo.
dnf:
name: "https://rpms.remirepo.net/enterprise/remi-release-8.rpm"
state: present

- name: Ensure firewalld is stopped (since this is a test server).
service: name=firewalld state=stopped

Expand All @@ -38,10 +28,10 @@
npm: "path={{ node_apps_location }}/app"

- name: Check list of running Node.js apps.
command: npx forever list
command: /usr/local/bin/forever list
register: forever_list
changed_when: false

- name: Start example Node.js app.
command: "npx forever start {{ node_apps_location }}/app/app.js"
command: "/usr/local/bin/forever start {{ node_apps_location }}/app/app.js"
when: "forever_list.stdout.find(node_apps_location + '/app/app.js') == -1"
Loading