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

Setting Up farmOS With DDEV and Composer #18

Closed
rgcarr opened this issue May 16, 2023 · 9 comments · Fixed by #19
Closed

Setting Up farmOS With DDEV and Composer #18

rgcarr opened this issue May 16, 2023 · 9 comments · Fixed by #19

Comments

@rgcarr
Copy link
Contributor

rgcarr commented May 16, 2023

DDEV is a great way to build Drupal (and other PHP-based) projects in a local environment; when combined with Colima and Mutagen, not only is the requirement for Docker desktop removed, but performance can be impressively fast. Instructions on setting up DDEV are at https://ddev.readthedocs.io/en/latest/users/install/

The recommended method to install a farmOS local development environment (https://farmos.org/development/environment) is via a Docker container, but this may not work well with Colima.

For certain local environments, installing farmOS by Composer may be more straightforward. The following commands would allow farmOS to be installed in a DDEV container:

mkdir farmos-ddev
cd farmos-ddev
ddev config --project-type=drupal9 --docroot=web --create-docroot
ddev start
ddev composer create "farmos/project:2.x-dev"
ddev composer require drush/drush
ddev drush site:install --account-name=admin --account-pass=admin -y
ddev drush uli
ddev launch

(HT @wotnak)

@paul121
Copy link
Member

paul121 commented May 16, 2023

We should make sure that the DDEV instructions include PostgreSQL and PHP-GEOS. I've included an example and some info on this here but I think (especially the PostgreSQL piece) could be improved for latest DDEV versions: https://farmos.discourse.group/t/installing-on-ddev-via-composer/1646/7?u=paul121

@rgcarr
Copy link
Contributor Author

rgcarr commented May 16, 2023

I'm still finding my way around Github... I started a PR at rgcarr#1 - I've no idea how that gets referenced here on this issue.

Anyway, @paul121 I agree that we should put a few recipes together for other local dev environments.

@paul121
Copy link
Member

paul121 commented May 16, 2023

Oh nice! You made a PR against your own fork. I'm not sure if you can "transfer" that to this farmos/farmos-community-blog repo... but you can make a new PR! If you open that rgcarr-ddev-farmos-composer-1 branch in the UI here you should see a "contribute" button at the top to make the PR?

@rgcarr
Copy link
Contributor Author

rgcarr commented May 16, 2023

OK this is fun... unless I'm creating work for someone else.

I think I've now done a PR against the main branch. Not sure if anyone else can access that and make further updates.

Everyday is a school day

@paul121
Copy link
Member

paul121 commented May 16, 2023

Yep this is a great start, thanks @rgcarr ! I'd like to figure out the postgres piece I mentioned since that is the DB we recommend. If it can remove the need for copying my .ddev directory that would be great, and it seems like that may be the case. I will try and make progress on that this week

@wotnak
Copy link
Collaborator

wotnak commented May 16, 2023

farmOS ddev setup with postgres and php-geos:

ddev config --project-type=drupal9 --docroot=web --create-docroot --database=postgres:15 --php-version=8.1
ddev get wotnak/ddev-php-geos
ddev start
ddev composer create farmos/project:2.x-dev
ddev drush site:install

@paul121
Copy link
Member

paul121 commented May 16, 2023

@wotnak that is so great! I think we can turn attention to wrapping up the PR for the blog post :-)

@RMattB1
Copy link

RMattB1 commented Mar 4, 2025

Hi all,
I'm trying to install an experimental local instance of the latest farmos release in a ddev environment, and arrived here via:

Is this page's top post the final/canonical doc, or did it end up getting refined and published somewhere under here?:
https://farmos.org/development
Thanks!

Matt

@mstenta
Copy link
Member

mstenta commented Mar 4, 2025

@RMattB1 This repository publishes to https://farmOS.org/blog

Here is the final blog post: https://farmos.org/blog/2023/installing-farmos-on-ddev-with-composer/

Note that we do not maintain blog posts as things change in farmOS, so they may become outdated, but I assume this one is still good.

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

Successfully merging a pull request may close this issue.

5 participants