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

[Maintenance][Docker]Create simple docker environment #13850

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

Ferror
Copy link
Contributor

@Ferror Ferror commented Apr 8, 2022

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets no
License MIT

This is the first version of working Sylius monorepo Docker Compose. Please note, that it is a simple docker environment and some things may not work yet out of the box - we should use it and inform you about any existing issues.

Things that do not work yet, but are not crucial

  • I decided to not install xdebug yet, but it will be provided in the nearest future
  • JS Behat tests are not successfully running as there is a problem with chrome on M1 processors. I'm in touch with somebody from https://github.com/Zenika/alpine-chrome as they are working on it in the latest version.

Requirements

  • Docker
  • Docker Compose
  • Free 80 and 3306 HTTP ports

How to run?

  • bash: docker compose up -d
  • docker-compose exec app bash or docker compose exec app bash for docker compose V2
  • run inside the container: make init - it will execute fixtures and composer
  • Mac OS only - wait for some as the container has to initialize and sync the file system
  • enter http://localhost:80

How to update?

  • bash: docker-compose down
  • bash: docker compose up -d
  • run inside the container: make init - it will execute fixtures, composer, and node updates
  • Mac OS only - wait for some as the container has to initialize and sync the file system
  • enter http://localhost:80

@Ferror Ferror requested a review from a team as a code owner April 8, 2022 09:51
@probot-autolabeler probot-autolabeler bot added the Maintenance CI configurations, READMEs, releases, etc. label Apr 8, 2022
@Ferror Ferror changed the title [Maintenance][Docker]Create simple environment [Maintenance][Docker]Create simple docker environment Apr 8, 2022
.docker/dev/php.ini Outdated Show resolved Hide resolved
Makefile Outdated
bin/console sylius:fixtures:load default --no-interaction
bin/console cache:warmup
yarn install --pure-lockfile
node_modules/gulp/bin/gulp.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why aren't you using yarn build command?

Copy link
Contributor Author

@Ferror Ferror Apr 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean for sake of readability I can change that. But the reason for that.. they are the same commands. When running gulp without any command parameter he will run the export default from gulpfile.js which in our case is build.

Long story short in our case node_modules/gulp/bin/gulp.js and yarn build are the same.

docker-compose.yml Show resolved Hide resolved
@Ferror
Copy link
Contributor Author

Ferror commented Apr 20, 2022

@lchrusciel can I ask you for merge or re-review?

Copy link
Member

@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, I've mentioned it, but in the next iteration we should provide some background worker for catalogue promotions in perhaps separate container or something like it

Comment on lines +15 to +17
vendor/bin/phpunit
vendor/bin/phpspec run --ansi --no-interaction -f dot
vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&@cli&&~@todo" # CLI Behat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought for later - won't it be better to reference this file instead of duplication of logic?

@lchrusciel lchrusciel added the Docker Docker-related issues and PRs. label Apr 21, 2022
@lchrusciel lchrusciel merged commit f08c43e into Sylius:master Apr 21, 2022
@Ferror Ferror deleted the docker-environment branch April 22, 2022 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs. Maintenance CI configurations, READMEs, releases, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants