Coder Social home page Coder Social logo

mscifo / pressless Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 14.0 57.78 MB

[NO LONGER MAINTAINED] A tool that migrates an existing Wordpress site into a fully functioning Serverless site, powered by AWS (Cloudfront, API Gateway, Lambda, S3).

License: MIT License

JavaScript 58.52% Shell 0.88% PHP 38.16% Dockerfile 2.43%

pressless's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pressless's Issues

Could not find the certificate

ACM Certificate region defaults to "us-east-1", rather it can be directly extracted from AWS CLi variables.

Quick Fix to "Certificate not Found" was to add the certificate for the domain to US-EAST-1.

`copydb` command requires a DSN - then uses the connection info from `wp-config.php`

So - I finally managed to get setup to run thanks to help from issue #1 - now trying to figure out where to go next. I decided to go from top to bottom in the help text. (as an aside, domain seems to be subsumed in setup).

copydb requires a DSN - then reads from wp-config.php for the connection information. setup requires a DSN (and probably? uses it) - this should be consistent between the two commands. This is especially applicable because I am running this on a copy of the site on my local filesystem - the DSN connects to my local database. I wasted some time trying to figure out why it wasn't accepting my connection (which I had to change due to fonini/dsn-parser#1) before realizing it might be connecting to the wrong db server instead of localhost... Can we at least make this consistent w/setup? Also, can we not ask for the DSN if we're planning to ignore it? I'm willing to change it in wp-config.php instead, of course, or supply it on the command line, etc. Just, I'd rather not have to do both.

Status of the project

Could I enquire whether this is still an active project and whether it is operational.

I have attempted to migrate a WP site using the instructions (and further guidance in the issues). All attempts to run result in an API Gateway timeout.

Many thanks

Setup Instructions

I have been trying to setup Pressless on a standard wordpress installation, but couldn't run "setup" command.

Instructions say I need 3 arguments:

  1. Domain - which i preassume should be in a standard format (www.example.com)
  2. Website_Bucket - Going through the code, it also accepts a domain name? So I would create a public S3 bucket and give its root address?
  3. ACM Certificate - This also expects a domain name, but I have no idea how can i get that. Tried giving it its arn instead but didn't work.

here is the command I tried to run:
pressless setup djraval.tk s3-ap-southeast-1.amazonaws.com/djraval-static/ -c arn:aws:acm:ap-southeast-1:201826946936:certificate/148e2860-a96e-41ea-bf8f-86064a536f3b

Do guide me over this.

Serverless dependency error

I get an error during npm install or pressless deploy:

> [email protected] postinstall /var/www/pressless/.pressless/node_modules/spawn-sync
> node postinstall


> [email protected] postinstall /var/www/pressless/.pressless/node_modules/serverless
> node ./scripts/postinstall.js


events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: socket hang up
    at createHangUpError (_http_client.js:322:15)
    at TLSSocket.socketOnEnd (_http_client.js:425:23)
    at TLSSocket.emit (events.js:187:15)
    at TLSSocket.EventEmitter.emit (domain.js:442:20)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at TLSSocket.socketOnEnd (_http_client.js:425:9)
    at TLSSocket.emit (events.js:187:15)
    [... lines matching original stack trace ...]
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm WARN .pressless No description
npm WARN .pressless No repository field.
npm WARN .pressless No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./scripts/postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-10-23T16_44_37_372Z-debug.log

It is resolved by modifying pressless to use serverless 1.32.0 instead of 1.17.0.

Setup without RDS?

If i'm not mistaken, this is serverless except for the database server -- is that true? Do I need to set up a RDS instance for this?

The appeal of the 'serverless wordpress' idea is that, if no one is accessing it, it costs nothing at rest except for S3 persistence. But if I have to pay to keep an RDS instance turned on, that defeats the purpose.

How close is this to being able to run the RDS only while the WordPress instance is being accessed?

Thanks for a pretty cool project so far anyway!

Incorrect use of promises in `setup`

Your code seems to assume that Promise-based code AWS calls will run in sequence, waiting for the previous to complete before continuing. This is not true (without async and then awaiting each one). As you require nodejs 6+, and async/await are in nodejs 8+, you'd have to do a required version bump to fix the Promises to work the way the code appears to assume they work...

How would you like to handle this? As is, the code would have to be restructured fairly severely to handle standard error checking properly, or a version bump - neither is a call I can make even with a GitHub Pull Request (especially restructuring all the Promise-based code :P ).

Serverless version insecure - `npm audit` recommends updating to 1.32.0

On line 285:

var npmInstall = shell.exec(`npm install`, {silent: false}).stdout;

we run npm install in ./.pressless, with a package.json file defined on line 136. On line 141:

"serverless": "1.17.0",
we require serverless version 1.17.0. npm install now automatically runs npm audit, which reports:

                  === npm audit security report ===

Run npm install [email protected] to resolve 1 vulnerability

┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High │ Denial of Service │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package │ https-proxy-agent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ serverless │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path │ serverless > https-proxy-agent │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info │ https://nodesecurity.io/advisories/593
└───────────────┴──────────────────────────────────────────────────────────────┘

found 1 high severity vulnerability in 630 scanned packages
run npm audit fix to fix 1 of them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.