-
-
Notifications
You must be signed in to change notification settings - Fork 893
Feature: Added Talawa-admin to run system daemon service in Linux, Added Eslint for Markdown file and updated the deprecated eslint #3130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
sahitya-chandra
wants to merge
29
commits into
PalisadoesFoundation:develop-postgres
from
sahitya-chandra:linux-systemd-service
Closed
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2c61c48
talawa_admin.service file added
sahitya-chandra 325ec7d
.eslintignore deleted and INSTALLATION.md updated
sahitya-chandra b001089
INSTALLATION.md file updated
sahitya-chandra 95a6a38
some refactor
sahitya-chandra 84389ba
coderabbit refactor added
sahitya-chandra ead061c
docs refactor
sahitya-chandra 1032f49
directory permission docs updated
sahitya-chandra e91881b
lint fix
sahitya-chandra 50a113f
lint fix
sahitya-chandra 2afb106
CODEROOT added
sahitya-chandra 8519aad
CODEROOT suggestion added
sahitya-chandra e388e89
Daemon service setup markdown file added
sahitya-chandra c9d035d
changes reset
sahitya-chandra fc675f8
added eslint for markdown files
sahitya-chandra 137d731
testing-library/react removed on coderabbit suggestion
sahitya-chandra 079540d
Merge branch 'develop-postgres' into linux-systemd-service
sahitya-chandra bc11733
Updated .eslintrc.json
sahitya-chandra ae588d3
.eslintignore deleted and INSTALLATION.md updated
sahitya-chandra f4dc91c
some fixes
sahitya-chandra 90b5ae2
refactor done
sahitya-chandra 8432fba
merge conflict resolved
sahitya-chandra e544362
fixes
sahitya-chandra be02982
some code cleanup
sahitya-chandra 3388e02
Merge branch 'develop-postgres' into linux-systemd-service
sahitya-chandra 3c6506a
docs update
sahitya-chandra 95697b8
docs update
sahitya-chandra 117baa3
docs updated according to code rabbit
sahitya-chandra 5399d22
docs updated according to code rabbit
sahitya-chandra 8d30102
docs updated
sahitya-chandra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
################################################################################ | ||
# | ||
# READ ALL STEPS BEFORE PROCEEDING | ||
# | ||
# 0) Ensure that Node.js and npm are correctly installed and available for the | ||
# specified user and group. | ||
# Use nvm for better interaction with different node versions. | ||
# 1) Place this file in the appropriate systemd directory based on your Linux | ||
# distribution, e.g., /etc/systemd/system/. | ||
# 2) Verify the CODEROOT path matches the Talawa-Admin code directory. | ||
# 3) Always add the absolute path of talawa-admin directory to WorkingDirectory don't use $CODEROOT. | ||
# 4) Ensure the EnvironmentFile path points to a valid .env file for the service. | ||
# 5) Adjust the User and Group to match the user account intended to run the service. | ||
# 6) Run the command "sudo systemctl daemon-reload" after saving changes. | ||
# 7) Use "sudo systemctl start talawa_admin.service" to start the service. | ||
# 8) Use "sudo systemctl stop talawa_admin.service" to stop the service. | ||
# 9) Use "sudo systemctl enable talawa_admin.service" to start the service on boot. | ||
# | ||
################################################################################ | ||
sahitya-chandra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[Unit] | ||
Description=Talawa-Admin Service | ||
After=network.target | ||
|
||
[Service] | ||
User=talawa_admin | ||
Group=talawa_admin | ||
Environment=CODEROOT=path/to/your/talawa-admin | ||
Environment=NODE_ENV=production | ||
|
||
# Absolute path is needed for working directory | ||
WorkingDirectory=/path/to/your/talawa-admin | ||
sahitya-chandra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
################################################################################ | ||
# No need to edit anything below here | ||
################################################################################ | ||
|
||
EnvironmentFile=$CODEROOT/.env | ||
sahitya-chandra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ExecStart=/bin/bash -c '\ | ||
if [ -f "$HOME/.nvm/nvm.sh" ]; then \ | ||
. "$HOME/.nvm/nvm.sh" && \ | ||
if nvm use default; then \ | ||
exec npm run serve \ | ||
else \ | ||
echo "Failed to set Node.js version" >&2; \ | ||
exit 1; \ | ||
fi \ | ||
else \ | ||
echo "NVM not found" >&2; \ | ||
exit 1; \ | ||
fi' | ||
|
||
Restart=on-failure | ||
RemainAfterExit=yes | ||
ProtectSystem=full | ||
NoNewPrivileges=true | ||
PrivateTmp=true | ||
Type=simple | ||
RuntimeDirectory=talawa-admin | ||
|
||
sahitya-chandra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.