I cloned source code of Mayan EDMS from git repo and getting issues of static files during local setup - mayanedms

I cloned the mayan-edms source code from the git. The server is running absolutely fine and documents are uploading but documents are not showing on the front-end. I think the issue is with Redis queues. It shows this message New document queued for upload and will be available shortly. I think this issue is related to Redis queues and I tried to set celery worker locally in Mayan but it couldn't run. Does anybody know about this issue of Mayan?

You need to run the command python manage.py initialsetup. This will solve my issue with running Mayan source code locally, other than that you need to check all the queues and the status of those queues.

Related

Automatic update local repository

I'm having trouble creating some sort of automatic deployment function with Github
So, what I have is a repository on Github, and a local folder in my Ubuntu connected to that repository on Github, and what I want to achieve is, that everytime I upload/Add a new file to the repository on Github, I can somehow run a script that updates the local folder on my Ubuntu, with those new files stored in my repository on Github.
So to sum it up;
1.Upload new files to repo in Github
2.Run script on local Ubuntu machine
3. Newly uploaded files in repo in Github gets added to local folder on Ubuntu machine.
Is there anyways to achieve this? Thanks!
That seems to be a case for webhook, which comes with a constraint: your machine should be reachable from github.com.
If that is the case, you can setup a listener (for instance, alexandru/github-webhook-listener), which will detect JSON payload sent by GitHub on each push on your repository.
That local listener can then trigger a simple git pull in your local repository, updating its content that way.

Concurrently JS application pipeline install and build hangs (Express js for server, Create-React-App for Client)

Problem: I have a project with a server (Express Server that handles file uploading and deleting) and client (Front End Create-React-App). The project structure looks like follows:
Root Folder With Server
Client Folder
Each folder has it's own package.json. Server Package.json. Client package.json
I'm trying to build and deploy onto azure however the pipeline hangs on "npm install and build".
It seems like the build succeeds but this phase just hangs. Here is my server.js (the routes are not included) file and yaml file just in case.
I'd appreciate any kind of help. Thank you!
Troubleshooting suggestions:
In the case of ensuring that the code in github is consistent with the local code, if an exception occurs, it is recommended to replace the linux platform and redeploy.
It is recommended to use my suggestion to recreate the repository, and then check the Action status in github.
Sum up:
In general, it is more appropriate to use Linux in azure than windows. For example, Linux supports npx, and may also support other packages and commands.
When the local code can run normally, there is generally no problem when deploying to github, unless there may be modifications, which we have ignored. So make sure the code is consistent.
General correct deployment steps:
First in the portal, make sure to create a web app application (not a static web app), and select the node environment.
Make sure that the sever program can run normally locally. Create a new repository in github.
->git init
->git add.
->git commit -m'init'
->git remote add origin https://github.com/{your name}/newAppname.git
->git push -u origin master
Connect in the Portal's Deployment center.
Then check the status of Action in github.

How do I setup a node server so that I can push updates with git?

If I'm hosting my own node.js server, how would I go about making it so that I can push updates to the code like I would on Heroku?
I want to be able to host my source code on the same server as my node app and then whenever I push updates, it will restart the node app with the updated code. How do I do this?
Thanks!
You should use a git post-receive hook.
From the documentation:
The post-receive hook runs after the entire process is completed and
can be used to update other services or notify users.
Your script could be something like
Stop your node app
Copy new files over old ones
Restart node app
Be aware that your script should not take a long time to run as
This script can’t stop the push process, but the client doesn’t
disconnect until it has completed; so, be careful when you try to do
anything that may take a long time.

remote deploy scripts for nodejs?

I am looking for a way to easily deploy a nodejs app via a command line script.
I found one solution:
https://github.com/Skookum/nimbus
I also heard that the whole thing can be done with git and post commit hooks.
What would people recommend?
edit: i am deploying it to my own box where i have root
You have two options on a self hosted setup.
Do it all yourself
This entails git post-receive hooks. In short you setup your production box to host a copy of your repository, on your local machine you setup a remote, let's call the remote production.
Now when you run git push production master on your local machine, the updates are sent and the server executes the post-receive hook on your server which runs whatever you wish.
Actions you may want are: checking out/writing the data in the repo to files/folders (the git repo on the server is stored as a bare repo); restarting your webserver; notifying you that there's been a deployment etc.
I'd suggest reading up on it at http://git-scm.com/book/en/Customizing-Git-Git-Hooks and taking a look at a few tutorials, this one (http://ryanflorence.com/deploying-websites-with-a-tiny-git-hook/) looks prety legit.
Use a service to manage it for you, http://www.deployhq.com/ is the only one that springs to mind but I'm sure there's other.
Good Luck and Happy Hacking :)
There is a tool called shipit.js (https://github.com/shipitjs/shipit) which allows you to perform different deployment tasks like:
moving code from the repo to the server
restarting server
installing node_modules
etc.
You create a config file, and then runs: npx shipit deploy and all tasks you specify are performed. In case of failure, it has a rollback mechanism.
There is a nice screencast about it: https://youtu.be/8PpBySjkWEM.

CruiseControl.net - Is there a way to run a batch file that will copy (msi) files to another server in a different domain?

I have an issue where I am trying to copy files(msi) from our build server to our Test server in CruiseControl. Once these are copied over we are planning on having a Scheduled Task that will run silent installs nightly. I need to be able to push back to CruiseControl the status of that build.
I am having issues copying these files from a batch file that is being run in our cruisecontrol prooject. I'm pretty sure its a permissions issue.
Also is there a way to push the build status back to CruiseControl so that it could tell us when the install failed?
Not a simple solution available, I'm afraid. Only time I saw anything similar done was using a python script to invoke commands on a remote system using ssh.

Resources