yeswework / fabrica-dev-kit

A toolkit for faster, smoother WordPress 5 development
https://fabri.ca/
MIT License
274 stars 27 forks source link

Can't run Fabrica on Ubuntu 16.10 #2

Closed webrune-tim closed 7 years ago

webrune-tim commented 7 years ago

I can’t this up and running on Ubuntu 16.10

I keep getting:

[Fabrica] Waiting for 'timpress_wp' container... More than 360 seconds elapsed while waiting for WordPress container to start.

‘timpress’ being my slug

Anyone have this problem?

RockPaperPencil commented 7 years ago

I also ran into this, a file permission issue was to blame.

Try making the www/ directory and change ownership to www-data:www-data before running the ./setup.rb command inside the fabrica directory like so: mkdir www && sudo chown www-data:www-data www

Explanation The [fabricaRoot]/www folder containing the webroot docker volume gets ownership root:root when created in the host file system by the docker daemon. These permissions passes thru to the wp container, causing the install to fail due to folder ownership of /var/www/html (passed thru from [fabricaRoot]/www) being root:root. By manually creating the directory with the correct permissions beforehand, the setup scripts inside the container (which runs as the user www-data) will have the necessary permissions to go through with the setup procedure.

tiojoca commented 7 years ago

Thanks @RockPaperPencil, that was in fact the issue! We ended up creating the www folder but keeping the owner as the host user and changing the container www-data user UID and GID to same values as that user. This way we can avoid that sudo (and typing passwords) on the setup process or when handling files in that folder in the host. And since Linux only looks at the UID and GID for permissions, the container assumes that the owner is in fact www-data.

@WebRuin can you please clone the new version and try again?

webrune-tim commented 7 years ago

Yes, thanks

webrune-tim commented 7 years ago

@tiojoca Not exactly sure what you mean when you say "changing the container www-data user UID and GID to same values as that user." Do you mean changing the group of the parent folder ei: fabrica-project to www-data?

webrune-tim commented 7 years ago

I got it... Thanks

tiojoca commented 7 years ago

The folders permissions aren't modified. Since the www folder is now created by the setup script, it will have the same permissions as the user running it. Only the numeric UID and GID that are attributed to the Docker user and group www-data are changed so that they're the same as the UID and GID of the host user who running setup.

Is it working well for you now @WebRuin ?