socioboard / Socioboard-5.0

Socioboard is world's first and open source Social Technology Enabler. Socioboard Core is our flagship product.
http://www.socioboard.org
Other
1.12k stars 358 forks source link

Installation guide? #112

Open emilyanncr opened 5 years ago

emilyanncr commented 5 years ago

Is there a set up guide somewhere or....

ChristianGaetcke commented 5 years ago

Well, I managed to get the site up and somehow running, but get continouus CORS errors and upgrading to other plans impossible (kind of a skeleton installation w/o any proper functions, even sendmail doesn't work properly and there are some errors in the code.). If needed, I can share what I have so far (on Ubuntu)

AishwaryaMurali commented 4 years ago

Is there a set up guide somewhere or....

For php setup : https://screencast-o-matic.com/watch/cqjVlHOGQo

For node setup :

  1. http://somup.com/cqjIXAeroO

  2. http://somup.com/cqjIlTerDW

AishwaryaMurali commented 4 years ago

Well, I managed to get the site up and somehow running, but get continouus CORS errors and upgrading to other plans impossible (kind of a skeleton installation w/o any proper functions, even sendmail doesn't work properly and there are some errors in the code.). If needed, I can share what I have so far (on Ubuntu)

Yes please share

TornMarketing commented 4 years ago

I feel there are still alot of steps missing from the above documentation videos, seems incomplete and we have spent the day trying to get a stable copy working. Unable to get past a issue with user registration

I am assuming there is a setup of the database? but couldnt see any reference to this in your documentation and there isnt a setup process when launching your platform

Do you have a docker or a setup stable instance on a server somewhere?

TechnologyClassroom commented 4 years ago

@ChristianGaetcke Can you post your Ubuntu notes?

Older related thread: https://github.com/socioboard/Socioboard-4.0/issues/104

Quin452 commented 4 years ago

I am assuming there is a setup of the database? but couldnt see any reference to this in your documentation and there isnt a setup process when launching your platform

@TornMarketing I've done this type of thing before. I couldn't see anything that created the database, so I manually created one myself, making sure the name matched the db_name in the config.json (there were a couple of places).

Then the migrate worked well.

TornMarketing commented 4 years ago

I am assuming there is a setup of the database? but couldnt see any reference to this in your documentation and there isnt a setup process when launching your platform

@TornMarketing I've done this type of thing before. I couldn't see anything that created the database, so I manually created one myself, making sure the name matched the db_name in the config.json (there were a couple of places).

Then the migrate worked well.

Hey mate

Is there a standard Database structure that needs to be setup, got the SQL statement handy?

Quin452 commented 4 years ago

Is there a standard Database structure that needs to be setup, got the SQL statement handy?

I literally just create the database, using utf8 unicode ci. Then I ran the migrate and seeding.

But there are numerous bugs and issues I've found. Sometimes I couldn't even serve the project, sometimes it's user registration, but I've yet to get it to a stage where it's ready.

I've tried both API and Web instructions, and neither seem to be fit for use.

This is also on Laragon (think WAMP/XAMPP), and I've never ran into an issue running apps like this (unless the code is broken somewhere).

TornMarketing commented 4 years ago

@Quin452 hey mate, another day trying to attack this platform, are you running this on a windows server or linux? I am trying to get this thing operation on Ubuntu. Super keen to get a working demo to explore

Really struggling to get how we run all the services (user/api/feeds/board) automatically using nodemon.

Secondly trying to get an understanding how social api relates to social web, might become more obvious once we get an operating system and there maybe some configurations to link the 2 after login via social web

Quin452 commented 4 years ago

@TornMarketing I installed it locally on a Windows machine. I used Laragon, which (for all intents and purposes) acts like an Ubuntu server

You can try a virtual machine, too, but as long as there is LAMP it should work.

But alas, I have found the lack of clear instruction to make this whole thing not worth it.

cseeger-epages commented 4 years ago

please provide a proper installation instruction (no video) or a put the installation into a bash script compatible with ubuntu or debian for easier installation. Also a docker(-compose) setup would be very handy. The biggest issue of this open source project is the lack of installation instructions since its pretty poor documented.

TechnologyClassroom commented 4 years ago

@cseeger-epages They did upload a doc including more instructions for Windows users. https://github.com/socioboard/Socioboard-4.0/blob/master/Socioboard%20Developer's%20Document.docx

It would still need some work to get it working with a bash script.

We should convert the doc file to markdown as it is not efficient with version control systems.

cseeger-epages commented 4 years ago

@TechnologyClassroom thanks i will try to get it working for linux when i have some time.

easaw commented 4 years ago

It's possible socioboard want you to buy into their SAAS option (socioboard.com) rather than offer a solution here.

Ideally they would put up a server script, but for now I'm very hesitant to use this, even the SAAS version, and it's the only FOSS social media software I've come across but seems unstable :(

Such a shame.

dmbomer commented 4 years ago

I'm stuck

When I run the following command C:\Users\david\Socioboard-4.0-master\socioboard-api\user>nodemon app.js [nodemon] 2.0.4 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node app.js (node:8300) [SEQUELIZE0004] DeprecationWarning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.

I'm at the end of database setup.

the log file from C:\Users\david\Socioboard-4.0-master\socioboard-api\user\public\logs { message: 'Cron setup intialized for monthly user stats...', level: 'info', timestamp: '2020-05-31T01:38:37.661Z' } { message: 'Mongo issues : failed to connect to server [localhost:27017] on first connect [MongoError: Authentication failed.\n' + ' at Function._getError (C:\Users\david\Socioboard-4.0-master\socioboard-api\library\node_modules\mongodb-core\lib\auth\scram.js:125:14)\n' + ' at C:\Users\david\Socioboard-4.0-master\socioboard-api\library\node_modules\mongodb-core\lib\auth\scram.js:175:31\n' + ' at Connection.messageHandler (C:\Users\david\Socioboard-4.0-master\socioboard-api\library\node_modules\mongodb-core\lib\connection\connect.js:334:5)\n' + ' at Connection.emit (events.js:315:20)\n' + ' at processMessage (C:\Users\david\Socioboard-4.0-master\socioboard-api\library\node_modules\mongodb-core\lib\connection\connection.js:364:10)\n' + ' at Socket. (C:\Users\david\Socioboard-4.0-master\socioboard-api\library\node_modules\mongodb-core\lib\connection\connection.js:533:15)\n' + ' at Socket.emit (events.js:315:20)\n' + ' at addChunk (_stream_readable.js:295:12)\n' + ' at readableAddChunk (_stream_readable.js:271:9)\n' + ' at Socket.Readable.push (_stream_readable.js:212:10)\n' + ' at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {\n' + ' [Symbol(mongoErrorContextSymbol)]: {}\n' + '}]', level: 'error', timestamp: '2020-05-31T01:38:39.735Z' }

Any idea's where I went wrong.

dmbomer commented 4 years ago

Now I am stuck here

C:\Users\david\Socioboard-4.0-master\socioboard-api\library\sequelize-cli\seeders>sequelize db:seed --seed 20190213051930-initialize_application_info.js

Sequelize CLI [Node: 12.17.0, CLI: 5.5.1, ORM: 5.21.12]

Loaded configuration file "config\config.json". Using environment "development". (node:9568) [SEQUELIZE0004] DeprecationWarning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.

ERROR: Unknown database 'database_development'

C:\Users\david\Socioboard-4.0-master\socioboard-api\library\sequelize-cli\seeders>

TechnologyClassroom commented 3 years ago

@manashgarg found a guide at https://www.linuxbabe.com/ubuntu/install-socioboard-on-ubuntu-20-04

Now this guide needs to be turned into a bash and docker script.

EngBadr commented 3 years ago

Hi , I'am using the Socioboard-5.0 , all steps event in above video are explain the version 4.

I try to follow some of these stesp until I reach the 4th steps in many atricles they say under this directory

/var/www/Socioboard-5.0/socioboard-api

there is no library and word document explain that library hold Common files and services

in version 5 I got to

/var/www/Socioboard-5.0/socioboard-api/Common

So I got to this /var/www/Socioboard-5.0/socioboard-api/Common/Sequelize-cli

to complete above steps.

However, there is no "config" directory. All documentation shows that we have to configure the mysql database under this directory sequelize-cli/config/config.json

There is no config.json.

can we create the config.json manually and follow the same steps.

by the way all founded fiels under /var/www/Socioboard-5.0/socioboard-api/Common/Sequelize-cli

here is the tree

├── README.md ├── migrations │   ├── 20210224113713-create-user-rewards.cjs │   ├── 20210224113742-create-user-activations.cjs │   ├── 20210224113748-create-user-details.cjs │   ├── 20210224113837-create-team-informations.cjs │   ├── 20210224113840-create-join-table-users-teams.cjs │   ├── 20210224113850-create-social-accounts.cjs │   ├── 20210224113860-create-join-table-teams-social-accounts.cjs │   ├── 20210228063759-create-application-informations.cjs │   ├── 20210228063765-create-users-schedule-details.cjs │   ├── 20210228063770-create-scheduled-informations.cjs │   ├── 20210228063780-create-user-payments.cjs │   ├── 20210228063790-create-user-media-details.cjs │   ├── 20210228065421-create-social-account-feeds-updates.cjs │   ├── 20210228065722-create-social-account-friends-counts.cjs │   ├── 20210228065733-create-boards.cjs │   ├── 20210507064415-create-pinterest-boards.cjs │   ├── 20210508053633-create-coupons.cjs │   ├── 20210508053634-create-update-model.cjs │   ├── 20210623152049-create-user-youtube-upload-details.cjs │   ├── 20210626041148-create-update-model.cjs │   ├── 20210702125605-create-user-ss-template-details.cjs │   └── 20210704162202-create-auto-reports.cjs ├── models │   ├── application_informations.cjs │   ├── auto_reports.cjs │   ├── boards.cjs │   ├── coupons.cjs │   ├── index.js │   ├── join_table_teams_social_accounts.cjs │   ├── join_table_users_teams.cjs │   ├── pinterest_boards.cjs │   ├── scheduled_informations.cjs │   ├── social_account_feeds_updates.cjs │   ├── social_account_friends_counts.cjs │   ├── social_accounts.cjs │   ├── team_informations.cjs │   ├── user_activations.cjs │   ├── user_details.cjs │   ├── user_media_details.cjs │   ├── user_payments.cjs │   ├── user_rewards.cjs │   ├── user_ss_template_details.cjs │   ├── user_youtube_upload_details.cjs │   └── users_schedule_details.cjs └── seeders ├── 20210303111816-initialize_application_informations.cjs ├── 20210303123613-initialize_dummy_users.cjs └── 20210303123650-initialize_socialaccounts.cjs

All explanation not compactable with version 5 !!!

ibrainRodriguez commented 3 years ago

@EngBadr ey bro!! do y can install socioboard 5.0?

I have tried but I can't get past the migrations

ShareBtech commented 3 years ago

I have tried following the instructions in linuxbabe website (which are usually amazing), however as recent comments library is missing and i assumed Common and many other things just dont add up.
Directory names have changed with capitalization at the begining. I have tried updated service files and running the services however keep getting the service is not running. ● socioboard-user.service - SocioBoard User Microservice Loaded: loaded (/etc/systemd/system/socioboard-user.service; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sat 2021-09-04 16:09:38 UTC; 2s ago Process: 8412 ExecStart=/usr/bin/nodemon notify.server.js (code=exited, status=217/USER) Main PID: 8412 (code=exited, status=217/USER)

would love to be pointed to a updated tutorial

aurora10 commented 3 years ago

I have tried following the instructions in linuxbabe website (which are usually amazing), however as recent comments library is missing and i assumed Common and many other things just dont add up. Directory names have changed with capitalization at the begining. I have tried updated service files and running the services however keep getting the service is not running. ● socioboard-user.service - SocioBoard User Microservice Loaded: loaded (/etc/systemd/system/socioboard-user.service; disabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sat 2021-09-04 16:09:38 UTC; 2s ago Process: 8412 ExecStart=/usr/bin/nodemon notify.server.js (code=exited, status=217/USER) Main PID: 8412 (code=exited, status=217/USER)

would love to be pointed to a updated tutorial

Same here. Also cannot find errors file.

kingprawn22 commented 2 years ago

I've just spent a couple of hours desperately trying to install Socioboard 5, but as the others here it didn't work. Does anybody have a guide that works? Tried the one on LinuxBabe and Atlantic.net, but no luck.

EDIT: I'm trying to use either CentOS or Ubuntu

TechnologyClassroom commented 2 years ago

@kingprawn22 Those guides are for version 4. The new version install scripts are here with doc here, but they probably need work. If you try them, report back on your progress and submit fixes back to mainline. Many have tried, but few have helped others.

kingprawn22 commented 2 years ago

@TechnologyClassroom these documents leave a lot to the imagination. Which one do I use? Do I need all requirements installed before running the commands in 'Linux-Installation.md' or the script 'Installation.sh'? Do I also need both the mongodb and mariadb databases setup before? Once I've ran these commands, then what? Do I still need to create and enable the systemd files and configure my webserver?

I'd be more than happy to go through the process to try and compile some half-decent documentation, but I do need the above pointers beforehand.

TechnologyClassroom commented 2 years ago

@kingprawn22 They still need work like I said. I have not tried since Socioboard 4 when all of the documentation was Windows-centric. The script IMO should get a functional local instance configured including database configuration with sane defaults, but as you pointed out this is not the case. If any API keys or passwords are needed they should be asked for or called as variables and handled by the script.

kingprawn22 commented 2 years ago

@TechnologyClassroom I'll give it a bash, combining the tutorials for v4 for general setup then the script for v5 and can see where I'm at. Would it be better to create a new issue for this?

TechnologyClassroom commented 2 years ago

This issue is as good as any to discuss the topic.

jon4short commented 2 years ago

@TechnologyClassroom I'll give it a bash, combining the tutorials for v4 for general setup then the script for v5 and can see where I'm at. Would it be better to create a new issue for this?

I would love to hear back about this. I managed to get the API's / Microservices running a couple days ago.. But after updating all my NPM Packages, It seemed to have broken Update, Feeds, Nofications & Publish. The Micro-Services don't start up anymore except for User

kingprawn22 commented 2 years ago

OK here's what I have so far. I've started right from the beginning of spinning up a VPS with Ubuntu 20.04. The guide is a mashup of the 3rd party installation guides and the docs from the repo and has been edited for v5.0. It's not complete, since the services are having some kind of issue as you'll see at the bottom, so it's probably best to tacking each issue as we come to it. I also saw an error when running the Installation.sh script. I ran it as sudo and there's text in the error that sugguests I should run it as my normal user, but that didn't work either.

Please let me know what I've done wrong and what I can do to look into these issues.

LAMP stack

Install Apache

$ sudo apt install -y apache2 apache2-utils
$ sudo systemctl enable apache2
$ sudo systemctl start apache2

Install MariaDB

$ sudo apt install mariadb-server mariadb-client
$ sudo systemctl enable mariadb
$ sudo systemctl start mariadb
$ sudo mysql_secure_installation

Install PHP

$ sudo apt install php libapache2-mod-php php-mysql php-common php-cli php-common php-json php-opcache php-readline
$ sudo a2enmod php

Install Socioboard

Install git

$ sudo apt install git

Clone repo

$ git clone https://github.com/socioboard/Socioboard-5.0.git

Install acl

$ sudo apt install acl

Move folder and set permissions

$ sudo mv Socioboard-5.0 /var/www/socioboard
$ sudo setfacl -R -m u:www-data:rwx /var/www/socioboard/

Install Node.js

$ curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
$ sudo apt install -y nodejs

Check if both node and npm are installed now with 'npm -v' and 'node -v'

Install Node packages

$ sudo npm install nodemon sequelize-cli sequelize mysql2 -g

Set Node environment

$ cd /var/www/socioboard
$ export NODE_ENV=development

Use install script

$ sudo bash ./Installation.sh

ERRORS (at the end of the output)

npm ERR! code 1
npm ERR! path /var/www/socioboard/socioboard-api/Common/node_modules/sharp
npm ERR! command failed
npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
npm ERR! sharp: Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag
npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
npm ERR! sharp: Installation error: EACCES: permission denied, mkdir '/root/.npm'

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-04-22T16_36_53_342Z-debug-0.log
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

changed 182 packages, and audited 183 packages in 9s

12 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
Installation.sh: line 41: cd: ./socioboard-api/User: No such file or directory

Create MariaDB database

$ sudo mysql

Enter the following when on the mysql command-line

create database socioboard;
create user socioboard@localhost identified by 'password';
grant all privileges on socioboard.* to socioboard@localhost;
flush privileges;
exit;

Setup database

$ sudo nano /var/www/socioboard/socioboard-api/Common/Sequelize-cli/config/config.json

Under 'development', enter the database name, username and password

  "development": {
    "username": "socioboard,
    "database": "socioboard",
    "password": "password",
    "host": "127.0.0.1",
    "dialect": "mysql",
    "pool": {
      "max": 100,
      "min": 0,
      "acquire": 1000000,
      "idle": 200000
    },

Change directory and inititialise the socioboard database

$ cd /var/www/socioboard/socioboard-api/Common/Sequelize-cli/
$ NODE_ENV=development sequelize db:migrate
$ NODE_ENV=development sequelize db:seed --seed 20210303111816-initialize_application_informations.cjs

Install and Configure MongoDB

$ wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
$ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
$ sudo apt update
$ sudo apt install mongodb-org
$ sudo systemctl enable mongod
$ sudo systemctl start mongod

Create database and user in MongoDB

$ sudo mongo

Enter the following when on the mongo command-line

use socioboard
db.new_collection.insert({ some_key: "some_value" })
db.createUser(
  {
    user: "socioboard",
    pwd: "password",
    roles: [ { role: "readWrite", db: "socioboard" } ]
  }
)
exit

Setup MongoDB connection

sudo nano /var/www/socioboard/socioboard-api/User/config/development.json

Under the 'mongo' header, enter the details of the database

    "mongo": {
      "username": "socioboard",
      "password": "password",
      "host": "localhost",
      "db_name": "socioboard"
    },

Then add the following lines to the bottom of the file, above the last curley bracket (you need to add a comma to the curley bracket above)

"base_path": "../../media",
"payment_path": "../../media/payments",
"template": "public/template/paymentTemplate.html"

So that it looks like this

    "twilio": {
      "account_sid": "<< twilio account_sid >>",
      "auth_key": "<< twilio auth_key >>",
      "service_id": "<< twilio service_id >>"
    },
    "base_path": "../../media",
    "payment_path": "../../media/payments",
    "template": "public/template/paymentTemplate.html"
  }

Save and close the file, then edit the following 3 files and enter the MongoDB database name, username and password under the 'mongo' header, as above /var/www/socioboard/socioboard-api/Feeds/config/development.json /var/www/socioboard/socioboard-api/Notification/config/development.json /var/www/socioboard/socioboard-api/Publish/config/development.json

Setup systemd services

socioboard-user.service

$ sudo nano /etc/systemd/system/socioboard-user.service

Populate the file with the following, replacing 'username' with your username

[Unit]
Description=SocioBoard User Microservice
After=multi-user.target

[Service]
Type=simple
User=username
WorkingDirectory=/var/www/socioboard/socioboard-api/User/
Environment=NODE_ENV=development
ExecStart=/usr/bin/nodemon app.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

socioboard-publish.service

$ sudo nano /etc/systemd/system/socioboard-publish.service
[Unit]
Description=SocioBoard Publish Microservice
After=multi-user.target

[Service]
Type=simple
User=username
WorkingDirectory=/var/www/socioboard/socioboard-api/Publish/
Environment=NODE_ENV=development
ExecStart=/usr/bin/nodemon app.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

socioboard-feeds.service

sudo nano /etc/systemd/system/socioboard-feeds.service
[Unit]
Description=SocioBoard Feeds Microservice
After=multi-user.target

[Service]
Type=simple
User=username
WorkingDirectory=/var/www/socioboard/socioboard-api/Feeds/
Environment=NODE_ENV=development
ExecStart=/usr/bin/nodemon app.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

socioboard-notification.service

sudo nano /etc/systemd/system/socioboard-notification.service
[Unit]
Description=SocioBoard Notification Microservice
After=multi-user.target

[Service]
Type=simple
User=username
WorkingDirectory=/var/www/socioboard/socioboard-api/Notification/
Environment=NODE_ENV=development
ExecStart=/usr/bin/nodemon app.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Enable all services

sudo systemctl enable socioboard-user socioboard-publish socioboard-feeds socioboard-notification

Start all services

sudo systemctl start socioboard-user socioboard-publish socioboard-feeds socioboard-notification

Find status of services

socioboard-user

● socioboard-user.service - SocioBoard User Microservice
     Loaded: loaded (/etc/systemd/system/socioboard-user.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-04-25 16:23:54 UTC; 16s ago
   Main PID: 74665 (node)
      Tasks: 11 (limit: 2274)
     Memory: 18.6M
     CGroup: /system.slice/socioboard-user.service
             └─74665 node /usr/bin/nodemon app.js

Apr 25 16:23:56 localhost nodemon[74694]:     at packageResolve (node:internal/modules/esm/resolve:932:9)
Apr 25 16:23:56 localhost nodemon[74694]:     at moduleResolve (node:internal/modules/esm/resolve:978:18)
Apr 25 16:23:56 localhost nodemon[74694]:     at defaultResolve (node:internal/modules/esm/resolve:1080:11)
Apr 25 16:23:56 localhost nodemon[74694]:     at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
Apr 25 16:23:56 localhost nodemon[74694]:     at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
Apr 25 16:23:56 localhost nodemon[74694]:     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
Apr 25 16:23:56 localhost nodemon[74694]:     at link (node:internal/modules/esm/module_job:78:36) {
Apr 25 16:23:56 localhost nodemon[74694]:   code: 'ERR_MODULE_NOT_FOUND'
Apr 25 16:23:56 localhost nodemon[74694]: }
Apr 25 16:23:56 localhost nodemon[74665]: [nodemon] app crashed - waiting for file changes before starting...

socioboard-publish

**● socioboard-publish.service - SocioBoard Publish Microservice
     Loaded: loaded (/etc/systemd/system/socioboard-publish.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-04-25 16:32:25 UTC; 2s ago
   Main PID: 74913 (node)
      Tasks: 11 (limit: 2274)
     Memory: 17.5M
     CGroup: /system.slice/socioboard-publish.service
             └─74913 node /usr/bin/nodemon app.js

Apr 25 16:32:25 localhost nodemon[74941]:     at packageResolve (node:internal/modules/esm/resolve:932:9)
Apr 25 16:32:25 localhost nodemon[74941]:     at moduleResolve (node:internal/modules/esm/resolve:978:18)
Apr 25 16:32:25 localhost nodemon[74941]:     at defaultResolve (node:internal/modules/esm/resolve:1080:11)
Apr 25 16:32:25 localhost nodemon[74941]:     at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
Apr 25 16:32:25 localhost nodemon[74941]:     at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
Apr 25 16:32:25 localhost nodemon[74941]:     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
Apr 25 16:32:25 localhost nodemon[74941]:     at link (node:internal/modules/esm/module_job:78:36) {
Apr 25 16:32:25 localhost nodemon[74941]:   code: 'ERR_MODULE_NOT_FOUND'
Apr 25 16:32:25 localhost nodemon[74941]: }
Apr 25 16:32:25 localhost nodemon[74913]: [nodemon] app crashed - waiting for file changes before starting...

socioboard-feeds

● socioboard-feeds.service - SocioBoard Feeds Microservice
     Loaded: loaded (/etc/systemd/system/socioboard-feeds.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-04-22 19:56:41 UTC; 2 days ago
   Main PID: 51431 (node)
      Tasks: 11 (limit: 2274)
     Memory: 14.0M
     CGroup: /system.slice/socioboard-feeds.service
             └─51431 node /usr/bin/nodemon app.js

Apr 22 19:56:43 localhost nodemon[51485]:     at packageResolve (node:internal/modules/esm/resolve:932:9)
Apr 22 19:56:43 localhost nodemon[51485]:     at moduleResolve (node:internal/modules/esm/resolve:978:18)
Apr 22 19:56:43 localhost nodemon[51485]:     at defaultResolve (node:internal/modules/esm/resolve:1080:11)
Apr 22 19:56:43 localhost nodemon[51485]:     at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
Apr 22 19:56:43 localhost nodemon[51485]:     at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
Apr 22 19:56:43 localhost nodemon[51485]:     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
Apr 22 19:56:43 localhost nodemon[51485]:     at link (node:internal/modules/esm/module_job:78:36) {
Apr 22 19:56:43 localhost nodemon[51485]:   code: 'ERR_MODULE_NOT_FOUND'
Apr 22 19:56:43 localhost nodemon[51485]: }
Apr 22 19:56:43 localhost nodemon[51431]: [nodemon] app crashed - waiting for file changes before starting...

socioboard-notification

● socioboard-notification.service - SocioBoard Notification Microservice
     Loaded: loaded (/etc/systemd/system/socioboard-notification.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-04-22 19:56:41 UTC; 2 days ago
   Main PID: 51432 (node)
      Tasks: 11 (limit: 2274)
     Memory: 12.8M
     CGroup: /system.slice/socioboard-notification.service
             └─51432 node /usr/bin/nodemon app.js

Apr 22 19:56:43 localhost nodemon[51487]:     at packageResolve (node:internal/modules/esm/resolve:932:9)
Apr 22 19:56:43 localhost nodemon[51487]:     at moduleResolve (node:internal/modules/esm/resolve:978:18)
Apr 22 19:56:43 localhost nodemon[51487]:     at defaultResolve (node:internal/modules/esm/resolve:1080:11)
Apr 22 19:56:43 localhost nodemon[51487]:     at ESMLoader.resolve (node:internal/modules/esm/loader:530:30)
Apr 22 19:56:43 localhost nodemon[51487]:     at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18)
Apr 22 19:56:43 localhost nodemon[51487]:     at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:79:40)
Apr 22 19:56:43 localhost nodemon[51487]:     at link (node:internal/modules/esm/module_job:78:36) {
Apr 22 19:56:43 localhost nodemon[51487]:   code: 'ERR_MODULE_NOT_FOUND'
Apr 22 19:56:43 localhost nodemon[51487]: }
Apr 22 19:56:43 localhost nodemon[51432]: [nodemon] app crashed - waiting for file changes before starting...
alexanderadam commented 2 years ago

As mentioned before a compose setup would probably be very handy. This would not only solve this issue here but also #239, #102 and #119. These four issues are obviously related. New container images could be automatically build and tagged with GitHub Actions.

It seems that @FlorentPoinsaut was successfull. So maybe it just needs someone™ to take the Dockerfile as the base for automatic builds and document a cleaned up version of the docker-compose.yml so that users could spin in up together in two minutes.

But maybe I missed something and it is more complicated. :shrug:

jon4short commented 2 years ago

Issues when running npm install in Common Directory

image

image

jon4short commented 2 years ago

And I think because of these vulnerabilities the update server does not run

image

TechnologyClassroom commented 2 years ago

@kingprawn22 I believe you need to replace the sudo bash ./Installation.sh piece with what @jon4short commented here until their patch is merged. Once merged, the majority of your commands should go into a patch in the same script.

Looks like we are closer yet to having a working install and and installation bash script.

LaurentCligny commented 2 years ago

@jon4short On my side I also had issue with the Update micro service not listening on port 3003. Seeing your error message (I didn't have any message in logs on my part) I added a test_url section on Update development.json, like this:

  "swagger_host_url": "localhost:3003",
  "user_socioboard": {
    "host_url": "http://localhost:3000"
  },
  "test_url": "",
  "jest": {
    "access_token": "<< JEST ACCESS TOKEN >>"
  },
  "facebook_api": {
    "app_id": "<< APP ID >>",

After that Update micro service was able to serve on port 3003, and guess what....

I finally been able to login on Socioboard 5 !

Socioboard 5 dashboard

I will try to bring a complete install doc on linux.

LaurentCligny commented 2 years ago

Hello @kingprawn22

Apr 22 19:56:43 localhost nodemon[51487]: at packageResolve (node:internal/modules/esm/resolve:932:9) Apr 22 19:56:43 localhost nodemon[51487]: at moduleResolve (node:internal/modules/esm/resolve:978:18) Apr 22 19:56:43 localhost nodemon[51487]: at defaultResolve (node:internal/modules/esm/resolve:1080:11) Apr 22 19:56:43 localhost nodemon[51487]: at ESMLoader.resolve (node:internal/modules/esm/loader:530:30) Apr 22 19:56:43 localhost nodemon[51487]: at ESMLoader.getModuleJob (node:internal/modules/esm/loader:251:18) Apr 22 19:56:43 localhost nodemon[51487]: at ModuleWrap. (node:internal/modules/esm/module_job:79:40) Apr 22 19:56:43 localhost nodemon[51487]: at link (node:internal/modules/esm/module_job:78:36) { Apr 22 19:56:43 localhost nodemon[51487]: code: 'ERR_MODULE_NOT_FOUND' Apr 22 19:56:43 localhost nodemon[51487]: } Apr 22 19:56:43 localhost nodemon[51432]: [nodemon] app crashed - waiting for file changes before starting...

Did you do npm installunder each micro service folders under socioboard-api path like mentionned here (do it one by one as the mentionned command chain is broken).

You will also have to run npm run swagger under the same micro service folders.

jon4short commented 2 years ago

@jon4short On my side I also had issue with the Update micro service not listening on port 3003. Seeing your error message (I didn't have any message in logs on my part) I added a test_url section on Update development.json, like this:

  "swagger_host_url": "localhost:3003",
  "user_socioboard": {
    "host_url": "http://localhost:3000"
  },
  "test_url": "",
  "jest": {
    "access_token": "<< JEST ACCESS TOKEN >>"
  },
  "facebook_api": {
    "app_id": "<< APP ID >>",

After that Update micro service was able to serve on port 3003, and guess what....

I finally been able to login on Socioboard 5 !

Socioboard 5 dashboard

I will try to bring a complete install doc on linux.

That should fix one of my problems 😃

The second issue now is setting up socioboard-web-php. When running "composer install && php artisan key:generate". I get an error about some permissions. Have run it in Super User.

Could you help me with a setup guide for the php side of things?

jon4short commented 2 years ago

@jon4short On my side I also had issue with the Update micro service not listening on port 3003. Seeing your error message (I didn't have any message in logs on my part) I added a test_url section on Update development.json, like this:

  "swagger_host_url": "localhost:3003",
  "user_socioboard": {
    "host_url": "http://localhost:3000"
  },
  "test_url": "",
  "jest": {
    "access_token": "<< JEST ACCESS TOKEN >>"
  },
  "facebook_api": {
    "app_id": "<< APP ID >>",

After that Update micro service was able to serve on port 3003, and guess what....

I finally been able to login on Socioboard 5 !

Socioboard 5 dashboard

I will try to bring a complete install doc on linux.

I submitted a pull request with a new installer script. Hopefully it would be a bit of help in your endeavor.

jon4short commented 2 years ago

Thank you so much @LaurentCligny. That worked brilliantly... All Microservices are running now via PM2.

image

image

image

image

image

TechnologyClassroom commented 2 years ago

Sounds like success! Can someone compile all of these changes into a pull request?

agrecasens commented 2 years ago

Hello! Is there a way to start with init? Why doesn't it allow me to use sudo systemctl

TechnologyClassroom commented 2 years ago

@agrecasens Which init system or OS are you using? You would have to convert the socioboard-user.service, socioboard-publish.service, socioboard-feeds.service, and socioboard-notification.service files to another init system.

agrecasens commented 2 years ago

@TechnologyClassroom Thanks for watching. I am using SysV, how do you modify those files? or how to pass to systemd?

TechnologyClassroom commented 2 years ago

@agrecasens I would say this discussion is probably out-of-scope for this discussion. Everyone I have every met that still uses SysV does so because they don't want to change the way they are writing configs. Most of the general documentation to learn about this is for converting SysV to systemd so I would start by heading up on those discussions. This converter might work too. If you get it to work with SysV, post that too. If SysV and systemd are figured out, maybe the install script could determine the init system and act accordingly.

kingprawn22 commented 2 years ago

I'm just catching up with what has been said. So I've retried the install but as reported by @jon4short above, I am seeing errors when running 'npm install' in the Common directory. Running 'npm audit fix --force' seems to fix some of them but leaves 6 (3 moderare, 2 high, 1 critical). Does this need resolved before I progress with the rest of the install? If so, how?

jon4short commented 2 years ago

@kingprawn22 The Microservices still run even with those errors. I'm now stuck with the PHP Setup. Since I wasted a week at work trying to get things working. I'm taking some time off from it. Hope to have something up and running by next week, to justify the hours spent on it. Will definitely post an updated guide.

kingprawn22 commented 2 years ago

Thanks for your efforts either way @jon4short. I am also quite busy right now and don't have the time to troubleshoot this. I'll leave it for now and can come back after some time to see if there's a working install script. How anybody has installed this is beyond me...

zicameau commented 2 years ago

@jon4short On my side I also had issue with the Update micro service not listening on port 3003. Seeing your error message (I didn't have any message in logs on my part) I added a test_url section on Update development.json, like this:

  "swagger_host_url": "localhost:3003",
  "user_socioboard": {
    "host_url": "http://localhost:3000"
  },
  "test_url": "",
  "jest": {
    "access_token": "<< JEST ACCESS TOKEN >>"
  },
  "facebook_api": {
    "app_id": "<< APP ID >>",

After that Update micro service was able to serve on port 3003, and guess what.... I finally been able to login on Socioboard 5 ! Socioboard 5 dashboard I will try to bring a complete install doc on linux.

That should fix one of my problems smiley

The second issue now is setting up socioboard-web-php. When running "composer install && php artisan key:generate". I get an error about some permissions. Have run it in Super User.

Could you help me with a setup guide for the php side of things? Hey, so I got to the point where I have all the microservices

@jon4short On my side I also had issue with the Update micro service not listening on port 3003. Seeing your error message (I didn't have any message in logs on my part) I added a test_url section on Update development.json, like this:

  "swagger_host_url": "localhost:3003",
  "user_socioboard": {
    "host_url": "http://localhost:3000"
  },
  "test_url": "",
  "jest": {
    "access_token": "<< JEST ACCESS TOKEN >>"
  },
  "facebook_api": {
    "app_id": "<< APP ID >>",

After that Update micro service was able to serve on port 3003, and guess what....

I finally been able to login on Socioboard 5 !

Socioboard 5 dashboard

I will try to bring a complete install doc on linux.

Alright so I got all the microservices running, but how did you get to this page? Do I need to setup and install the php portion? Thanks, this issue thread has helped a lot in my progress on getting things up and running!

jon4short commented 2 years ago

@LaurentCligny How did you get the PHP side running?

Quin452 commented 1 year ago

3 years on (for me personally) and I'm looking at trying this again. Does anyone have any clearer instructions?