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

Using Docker for Sculpin #456

Open
beryllium opened this issue Nov 29, 2020 · 1 comment
Open

Using Docker for Sculpin #456

beryllium opened this issue Nov 29, 2020 · 1 comment

Comments

@beryllium
Copy link
Member

This issue is intended to be a discussion point for how we can use Docker with Sculpin.

Primary concerns:

  • Delivering a stable experience for users
  • Handling complex site configurations, including possible multi-site configurations
  • handling complex installations, with required PHP extensions & custom sculpin kernel & many composer deps

My hope is that all of this could be solved with a very short Dockerfile that people can easily put in their projects. Ideally, with minimal required maintenance for both users & project maintainers.

@hopeseekr
Copy link

hopeseekr commented Dec 9, 2020

I just tried to dockerize Sculpin via the new semi-official "PHP-way" to dockerize apps:

composer create-project sculpin/blog-skeleton my-blog
cd my-blog
yarn install
composer sculpin-watch

Then run:

ln -s source public
composer require --dev phpexperts/dockerize
php vendor/phpexperts/dockerize/install.php
docker-compose up -d

Worked like a champ.

It literally took me less than 2 minutes to dockerize this app. I've been using phpexperts/dockerize on all of my projects. All you really have to do is ln -s your_web_root public and you're good to go! Maybe edit a few nginx rewrite rules in the provided docker/web/sites/001_default.conf. Works well with Kubernetes, too.

Of course, following the documentation on https://github.com/PHPExpertsInc/dockerize-php, I edited the the newly-created docker/web/sites/001_default.conf and disabled the listening to the PHP-FPM proxy for a pure static site.

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