Skip to content
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

Need new future: long running commands #14

Closed
region23 opened this issue Dec 2, 2015 · 19 comments
Closed

Need new future: long running commands #14

region23 opened this issue Dec 2, 2015 · 19 comments

Comments

@region23
Copy link

region23 commented Dec 2, 2015

It would be cool if it will be possible that git add-on perform multiple commands and run long-running commands, then we will abandon supervisord.

@abiosoft
Copy link
Owner

abiosoft commented Dec 2, 2015

I've started working on this. :)

However, this is gonna be basic and will definitely not be as feature-rich as supervisord.

@abiosoft
Copy link
Owner

abiosoft commented Dec 3, 2015

This is now supported. You can use then_long config for this. Check README.

@abiosoft abiosoft closed this as completed Dec 3, 2015
@region23
Copy link
Author

region23 commented Dec 3, 2015

@abiosoft Thank you very much! Immediately begin testing

@region23
Copy link
Author

region23 commented Dec 3, 2015

@abiosoft Can then_long check if service is down & restart it?
How to build beta version of caddy with new version of git addon?

@abiosoft
Copy link
Owner

abiosoft commented Dec 3, 2015

I did not cater for shutdown but now that you've mentioned it, I see the need. What I am gonna make it do is to check the exit status. If it exits on error then it is gonna be restarted.

You can use https://github.com/caddyserver/caddyext for that.

Thanks.

@abiosoft abiosoft reopened this Dec 3, 2015
@region23
Copy link
Author

region23 commented Dec 3, 2015

@abiosoft thanks twice :)

@abiosoft
Copy link
Owner

abiosoft commented Dec 3, 2015

Done :)

@abiosoft abiosoft closed this as completed Dec 3, 2015
@region23
Copy link
Author

region23 commented Dec 4, 2015

Where I can see log file of then_long command?

@abiosoft
Copy link
Owner

abiosoft commented Dec 4, 2015

It logs to wherever caddy outputs to.

I'd advise you pull latest changes. I made two minor bug fixes last night.

Cheers :)

@region23
Copy link
Author

region23 commented Dec 4, 2015

pull just now :) 👍

@region23
Copy link
Author

region23 commented Dec 4, 2015

I have an error: Parse error: Wrong argument count or unexpected line ending after 'then_long'
I try to quote command mimozaflowers, but this not help.

This is my Caddyfile

mimozaflowers.ru, www.mimozaflowers.ru {
        root /root/gocode/src/github.com/pavlik/mimozaflowers
        gzip
        log /var/log/mimoza_access.log

        errors {
                log /var/log/mimoza_error.log
                #404 404.html # Not Found
        }

        git {
                path ./
                repo https://github.com/pavlik/mimozaflowers
                hook /webhook my_secret
                then go install
                then_long /root/gocode/bin/mimozaflowers
        }

        proxy / localhost:9000
}

@abiosoft
Copy link
Owner

abiosoft commented Dec 4, 2015

I have not experienced this and can not reproduce it.

What platform are you on ?

@region23
Copy link
Author

region23 commented Dec 4, 2015

@abiosoft Ubuntu 14.04 64 bit

@abiosoft
Copy link
Owner

abiosoft commented Dec 4, 2015

@Pavlik Ensure the Caddy you're using includes the Git plugin.

@region23
Copy link
Author

region23 commented Dec 4, 2015

@abiosoft caddy 0.8 beta 4 with last ver of your pluggin installed by caddyext & then I make go install in caddy dir for new executable ver of caddy.
git plugin works fine. Only command then_long not work

@abiosoft
Copy link
Owner

abiosoft commented Dec 4, 2015

Sorry follow this steps, I think you're using an outdated version.

$ caddyext install git
$ go get github.com/mholt/caddy

Then try again.

@region23
Copy link
Author

region23 commented Dec 4, 2015

@abiosoft I remove caddy from bin directory, then I follow your instructions. Then go install for caddy. But this error still happened.

@abiosoft
Copy link
Owner

abiosoft commented Dec 4, 2015

Caddy 0.8 is released. Can you try downloading from Caddy's site now and trying again.

Or
wget -O caddy.tar.gz "https://caddyserver.com/download/build?os=linux&arch=amd64&features=git"

Then extract the tar and try again.

@region23
Copy link
Author

region23 commented Dec 4, 2015

@abiosoft with caddy 0.8 al works fine! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants