Wykres commitów

249 Commity (fefff34127adf6e2317fbc2eb2ead75047877292)

Autor SHA1 Wiadomość Data
Rui Carmo 56d4e8bd91 reinstate gzip_disable 2019-11-20 19:41:04 +00:00
Rui Carmo f689992e50 pyflake8 changes 2019-11-20 19:37:37 +00:00
Rui Carmo 135c771a1f Keep pyflake happy for now 2019-11-20 19:27:20 +00:00
Rui Carmo 28ec78ad47 Remove Internet Explorer 6 gzip disable 2019-11-20 19:23:41 +00:00
Rui Carmo 15e6a81cbf
Merge pull request #128 from jsenin/master
Do not process empty lines or commented at Procfile
2019-11-20 19:12:04 +00:00
Rui Carmo 5523595a73
Merge branch 'master' into fix-http-socket-dup 2019-11-20 19:05:26 +00:00
Rui Carmo 2f1c815512
Merge branch 'master' into master 2019-11-20 18:42:50 +00:00
dWiGhT a93b471d67 build: lite cleanup of pylint results (#141) 2019-11-20 08:28:02 +00:00
Chris McCormick 5ddb3619a2 Fix clashing HTTP ports in uwsgi deploy. #125 2019-11-19 17:10:13 +08:00
Jorge Senín 666f871bc9 Remove trailing spaces (#133) 2019-11-19 08:09:08 +00:00
Jorge Senín 7a3f89cfa5 Do not process empty lines or commented at Procfile 2019-11-19 08:34:41 +01:00
Jorge Senín 6f0468008a Add piku help command, and support sort and large arguments -h and --help (#131) 2019-11-18 21:33:01 +00:00
dWiGhT 0d9815fdcb improvement: `piku apps` marks running apps w/ * (#132)
* improvement: `piku apps` marks running apps w/ *

```
🍺 $ piku apps
*myapp1
 sample
*myapp2
```

* Update piku.py
2019-11-18 21:30:39 +00:00
dWiGhT f6130db815 improvement: added optional <process> to logs also hid INTERNAL cmds. (#126)
* improvement: added an optional <process> to logs also hide INTERNAL stuff

* Update INSTALL.md

* Update piku.py
2019-11-17 20:51:24 +00:00
Chris McCormick 5d79013e05 Fix detection order of app type + deps. (#123)
This is an alternative fix to #111.
2019-11-13 17:57:04 +00:00
Chris McCormick 953b299ab1 Include nodeenv installed binaries. (#117) 2019-11-13 17:56:07 +00:00
John Simiyu 817f912994 Enhancement closes #101 (#109) 2019-10-06 13:54:23 +01:00
Chris McCormick 21003f0fc3 Clojure integration (#108)
* Clojure Support

Conflicts:
	piku.py

* Tweaks to get Clojure deploy working.

 * Allows user to install lein binary into ~/bin
 * Simplifies Clojure re-build sequence

* Bootstrap playbooks for lein + Java.
2019-09-29 18:43:07 +01:00
Chris McCormick 137d870570 Fix letsencrypt renewal on HTTPS only sites. (#106) 2019-09-27 07:29:21 +01:00
John Simiyu d74bbe2249 Fixed Java Deployment (#104)
* Fixed Java Deployment

* Update #Removing previous builds
2019-09-15 09:35:45 +01:00
Chris McCormick a24488531b Fix typo breaking wsgi deploys. #102 (#103) 2019-09-09 15:40:07 +01:00
Chris McCormick ed4334e214 Forgot deploy_identity in generic release. #98 (#100) 2019-09-06 18:02:41 +01:00
Chris McCormick 483ecd885c Allow purely shell based deploys. (#98)
This PR modifies Piku such that if the user has a `web` and a `release`
worker defined it will allow the deploy to continue. This is useful in
cases where the user wants to run some binary server.

An example is the gitea deploy. Without this change it needs a
superfluous requirements.txt file exists before it will deploy. If/when
this is merged I'll update the deploy-gitea repo to remove that
superfluous file.

Another fun thing this would allow is tiny web services written with
bash/netcat etc.
2019-08-31 09:38:14 +01:00
Chris McCormick c00e130b87 Enable gh-pages style static site deployment. (#97)
* Enable gh-pages style static site deployment.

As per #42 this PR allows the user to do static site deployments using
Piku which work very similarly to gh-pages. In the Procfile the user
defines a worker called 'static' with the path to the root of the files
to be served. An example app can be found here:
https://github.com/chr15m/piku-static-site

* Documentation.
2019-08-30 11:07:55 +01:00
Rui Carmo 5e03d70046 removed unused import - fixes #94 2019-08-26 13:02:18 +01:00
Chris McCormick 7d4e7e2cb7 Env UWSGI_INCLUDE_FILE to include custom uwsgi. (#93) 2019-08-22 17:40:00 +01:00
Chris McCormick 57a71474bd Fixed broken logic detecting wsgi workers. (#89)
* Fixed broken logic detecting wsgi workers. #88

* Fix logic errors in jwsgi detection. #88
2019-08-18 09:36:05 +01:00
Chris McCormick 7a73cd8e3e Stop nginx confs from leaking into LIVE_ENV. #84 (#85) 2019-08-12 06:56:59 +01:00
John Simiyu bfc4f8ce32 Java Support (#81)
* Added support for Java Deployment with Maven

* Added support for Java Deployment with Maven

* @matrixjnr/feature:java support

* @matrixjnr/feature:java support
2019-08-10 22:00:40 +01:00
Chris McCormick 90d20dac28 Include a custom nginx config fragment with NGINX_INCLUDE_FILE (#79)
* Refactor common config out of nginx templates.

* A way to inject custom nginx directives.

Setting the ENV variable `NGINX_INCLUDE_FILE` allows the user to specify a
file, relative to the app folder, which will be inserted into the nginx
server config.

This is useful for e.g. overriding a variable. For example to allow
uploads larger than 1Mb the user could create a file called `nginx.conf`
in their app repo containing: `client_max_body_size 8M;` and then set
`NGINX_INCLUDE_FILE=nginx.conf` in the ENV file.

This builds on #77 so that should be merged first.
2019-08-05 09:10:42 +01:00
Chris McCormick dca9342b2e Block access to .git folders (allow if NGINX_ALLOW_GIT_FOLDERS is set) (#78)
* Refactor common config out of nginx templates.

* Block access to .git folders with ENV to allow.

See #76
2019-08-05 09:09:22 +01:00
Chris McCormick afac14862f Refactor common config out of nginx templates. (#77) 2019-08-05 09:09:11 +01:00
Chris McCormick 52f4a1d634 Fix `git remote show` (shim git-upload-pack). (#74) 2019-08-05 09:08:59 +01:00
Chris McCormick 9876ecc2e0 Fix to upgrade node version correctly. (#73)
This patch changes piku to check the installed node version and leave it
if correct.

It also separates the nodeenv install and the npm install steps.

It will also warn the user if they try to change the node version in a
running app, and tells them to stop and then deploy the app again in
order to update the node version.

Fixes #70.
2019-08-05 09:08:48 +01:00
dWiGhT a5efdf89b5 improvement: allow newlines in ENV files (#69) 2019-08-05 09:08:24 +01:00
Chris McCormick 85d8be87eb Support pushes to non-master branches. (#75) 2019-08-05 09:07:47 +01:00
Chris McCormick fc0abee262 If nginx config test fails remove app nginx conf. (#62) 2019-07-14 17:12:43 +01:00
Chris McCormick dce587c053 Node improvements and versioning (#58)
* Fix node path insert to not clobber env.

* Tighter check on python venv for uwsgi conf.

* Install NODE_VERSION if nodeenv on PATH.

* Document NODE_VERSION setting.
2019-07-13 16:29:34 +01:00
Chris McCormick 9b9059c873 Add node_modules/.bin to node deploy path. (#54)
This change allows for npm installed binaries (such as wisp,
coffeescript, babel, etc.) to be used at deployment and run time.
2019-07-07 12:07:24 +01:00
Chris McCormick b5daedb5bc Move release worker to end of deploy. (#50)
* Move release worker to end of deploy.

This matches up with what other PaaS platforms do. This change also
makes the release worker inherit the environment (virtualenv etc.) from
the deploy process, making it easier to run e.g. Django manage.py
commands in the expected context without explicitly entering virtualenv
in the script.

* Update Django example to remove virtualenv.

Now that this happens automatically we don't need to explicitly enter
virtualenv in the script.

* Pass spawn env back through to release worker.

Conflicts:
	piku.py
2019-06-28 12:59:12 +01:00
Chris McCormick e43b318d61 Fix node deploy path handling. (#49)
* Fix node deploy path handling.

This patch uses a temporary symlink to envs/APP/node_modules to force
node to install the modules into the right place even on older node
versions, like v4.2.6 which ships with Unbuntu 16.04.

Apps launching node servers will need to manually set
NODE_PATH="${VIRTUAL_ENV}/node_modules" to have it run correctly, and
in future we should consider setting this in spawn_app (though currently
spawn_app does not know what kind of app it's spawning).

* Add NODE_PATH to spawn env if node env present.
2019-06-28 12:56:37 +01:00
Chris McCormick d26fb6ee1c Clean up acme certs on destroy. (#51)
This will prevent the acme.sh cron job from continuing to request
certificates for apps which have been destroyed.
2019-06-28 12:55:34 +01:00
Chris McCormick 3ce615ec7a No virtualenv in uwsgi config if missing. (#48)
This patch skips adding the 'virtualenv' setting to the uwsgi config if
the project does not have a valid virtualenv.

This allows nodejs projects to run under the 'web' worker correct.
Presumably Go projects will be similarly hampered without this patch.
2019-06-27 07:42:54 +01:00
Chris McCormick 2c1b70b1b9 Ignore removed workers in SCALING file. (#47)
If a worker has been removed from the Procfile it may still have an
entry in the SCALING file on the server which causes a traceback when
the removed worker is attempted to be spawned. With this patch piku
ignores SCALING file entries which do not have a corresponding worker
defined in Procfile.
2019-06-27 07:41:22 +01:00
Chris McCormick 02c9017db9 Generate self-signed cert if acme fails. (#46)
Under certain conditions the acme cert generation will fail and create a
zero-byte certificate. Nginx does not like this so in that case piku.py
will generate a self-signed cert as a fallback with this patch.
2019-06-27 07:41:07 +01:00
Chris McCormick 8c835b28ad Improved AUTO_RESTART to prevent 2x uwsgi bounce. (#45)
The previous implementation of the AUTO_RESTART setting was causing
uwsgi have two separate configs installed one after the other very
quickly, which was causing issues.

This change fixes that by deleting the 'enabled' uwsgi config just
before re-generating it if AUTO_RESTART is true. This has the same basic
effect (reload on change) without the double-triggering of uwsgi reload.
2019-06-27 07:40:52 +01:00
Rui Carmo 8962fa9523
Better Cloudflare API error handling 2019-06-25 11:46:55 +01:00
Chris McCormick 8ca63c60de Release worker: provide full env + remove worker. (#39)
* Release worker: provide full env + remove worker.

This change improves the release task pseudo-worker.

 * Provides the full environment (both app env and config env) to the
   release task.

 * Uses a non-zero return value to bail early if release
   phase fails.

* Make ENV_ROOT (venv) accessible to release scripts.
2019-06-23 15:48:47 +01:00
Chris McCormick a9b58917b4 RFC: letsencrypt SSL certificate support (#38)
* Add Let's Encrypt SSL cert support.

This patch has piku use the acme.sh script to request and maintain Let's
Encrypt SSL certs rather than generate self-signed certs.  For it to
work you must install acme.sh as the user piku.  Installation
instructions here: https://github.com/Neilpang/acme.sh#1-how-to-install
The next commit updates piku-bootstrap to install acme.sh by default.

If acme.sh is not installed piku continues to default to a self-signed
certificate.

* Install acme.sh SSL cert wrangler in bootstrap.

The previous commit contains details about usage.
2019-06-23 15:47:58 +01:00
Chris McCormick 0a1dc6cf13 Fix static paths by switching to expandvars(). (#41)
This fixes #40.
2019-06-23 15:44:57 +01:00