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

Discovery for Docker environment with containers [SPIKE] #126

Closed
ericerway opened this issue Jul 5, 2018 · 3 comments
Closed

Discovery for Docker environment with containers [SPIKE] #126

ericerway opened this issue Jul 5, 2018 · 3 comments

Comments

@ericerway
Copy link

This issue is for the following packages:

[ ] venia-concept
[X] pwa-buildpack
[ ] peregrine
[ ] pwa-module
[X] pwa-devdocs

This issue is a:

[ ] Bug
[X] Feature suggestion
[ ] Documentation issue
[ ] Other (Please Specify)

Environment

Question Answer
Magento version
Operating System + version
node.js version (node -v)
npm version (npm -v)

Description

As a developer, I want to utilize Docker to quickly get started with development for PWA Studio regardless of my environment and potentially contribute to the project.

Expected result:

Discovery for continuously updated Docker container for PWA Studio environment
Review and summary of Docker findings and process
Additional user stories/epics for implementation
Example and demo (as appropriate)

Possible solutions:

@pcvonz
Copy link
Contributor

pcvonz commented Aug 7, 2018

Mentioned this in Slack, didn't know there was an issue for it.

Forked a Magento 2 docker image and made it pull from the 2.3-develop branch. Also added a script to install Venia. The docker image also comes with a self signed cert so magento can be served through HTTPS (default for the venia-concept). Installing venia is documented in the readme here

Link to the repo: https://github.com/pcvonz/docker-magento2

There is one stumbling block that I can think of: The composer.json in the venia package needs a version number for the install-venia script to work. Also at times trying to run venia with the packages that exist on npm can be troublesome, so I usually resort to installing packages locally (ex: npm i ../pwa-buildback && npm i ../peregrine). But that's unrelated to the docker image.

There is a little bit of cruft from the version of the image I forked, notably the developer / integrator folders. Those aren't relevant anymore. They can probably be removed and we could use just one dockerfile. It doesn't clutter up the actual image and I just wanted to start contributing to Venia 😃

To build the dockerfile right now you need to use node. (shouldn't be necessary in the future)

  • Edit dockerfile.hbs and then run node update.js.
  • A dockerfile will be built in the integrator and the developer folder.
  • The cron file and the dockerfile need to be moved from integrator folder into same folder as the docker-compose.yml.
  • Edit the docker-compose.yml file and change the line from - image: something/something to build - build: .
  • Now run docker-compose up -d and it will attempt to build a new image with your changes to the dockerfile

Left to do:

  • Set up automatic builds
  • Remove unnecessary code / files / folders from the version I forked

@ericerway
Copy link
Author

Kamino cloned this issue to magento-research/pwa-studio

@sharkySharks
Copy link
Contributor

work being picked up under #734

@awilcoxa awilcoxa added this to the DevOps Improvements Phase 1 milestone Aug 29, 2019
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

5 participants