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

Add Development Container Configuration and GitHub Codespace Support #44128

Open
wants to merge 3 commits into
base: 4.4-dev
Choose a base branch
from

Conversation

alebak
Copy link

@alebak alebak commented Sep 23, 2024

Pull Request for Issue #43802.

Summary of Changes

This pull request introduces a development environment configuration for Joomla! CMS using devcontainers, making it possible to develop and test Joomla directly from GitHub Codespaces or Visual Studio Code. The implementation is based on existing devcontainer examples, which have been adjusted for Joomla.

Key changes include:

  • Addition of a .devcontainer folder with all necessary configuration files to initialize a development environment.
  • Support for running Joomla CMS seamlessly in GitHub Codespaces or locally in Visual Studio Code.

This configuration simplifies the setup for developers looking to contribute to Joomla's core, providing a consistent and efficient environment with minimal effort.

Testing Instructions

  1. Open the Joomla repository in GitHub Codespaces or Visual Studio Code.
  2. Ensure you have the latest version of Visual Studio Code installed, along with the Remote - Containers extension.
  3. Launch the devcontainer environment.
  4. Verify that Joomla runs correctly by following the on-screen setup instructions.
  5. Confirm that changes to the codebase are reflected when testing locally.

Actual result BEFORE applying this Pull Request

No integrated setup available for Joomla development in GitHub Codespaces or Visual Studio Code using devcontainers.

Expected result AFTER applying this Pull Request

Developers will be able to use GitHub Codespaces or Visual Studio Code to set up a full Joomla development environment with devcontainers, simplifying contributions and testing.


I've tested the implementation, and it works seamlessly in GitHub Codespaces. However, this pull request is intended to start the conversation around configuring additional tools that will ensure proper development practices for Joomla’s core, such as linters, cs fixers, and extensions to adhere to Joomla's standards. Collaboration from the community is highly encouraged to refine this setup and make it more robust for all contributors.

alebak and others added 3 commits September 23, 2024 09:12
- Changed from Alpine Linux to Debian
- Changed from Nginx to Apache
- Changed from MySQL 8.0 to the latest MySQL version
@brianteeman
Copy link
Contributor

Ensure you have the latest version of Visual Studio Code installed, along with the Remote - Containers extension.

Just checking that you mean Dev Containers https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

@brianteeman
Copy link
Contributor

Took a while but I got it to work with codespaces.

When I open the joomla site in the browser it opens correctly BUT when I add /administrator to the url I get a 404

image

@alebak
Copy link
Author

alebak commented Sep 23, 2024

Hello @brianteeman,

Ensure you have the latest version of Visual Studio Code installed, along with the Remote - Containers extension.

Just checking that you mean Dev Containers https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

This is in case you want to use it locally with Visual Studio Code. You must have Docker running and the DevContainer extension.

Took a while but I got it to work with codespaces.

When I open the joomla site in the browser it opens correctly BUT when I add /administrator to the url I get a 404

image

Could you share with me a screenshot of what you get in the CodeSpaces terminal?

@Hackwar
Copy link
Member

Hackwar commented Sep 23, 2024

Hello @alebak, thank you for this great feature. I'm looking forward to testing this. However, you made this PR against 4.4-dev. 4.4 wont receive any new features anymore and I would still judge this as a new feature. Joomla 5.1 also wont see any new release and 5.2 is in a state where again: no new features. Long story short, could you switch this PR to be against 5.3-dev?

@alebak
Copy link
Author

alebak commented Sep 23, 2024

Hello @Hackwar,

Hello @alebak, thank you for this great feature. I'm looking forward to testing this. However, you made this PR against 4.4-dev. 4.4 wont receive any new features anymore and I would still judge this as a new feature. Joomla 5.1 also wont see any new release and 5.2 is in a state where again: no new features. Long story short, could you switch this PR to be against 5.3-dev?

Of course I can change it. I did it in version 4.4-dev because it is the default branch in the repository. Do you think this would be a new feature for the Joomla version?

This feature can be implemented in all Joomla development branches without problems, basically, because all this does is to prepare you a sandbox quickly to test and program in Joomla.

I appreciate the comments

@brianteeman
Copy link
Contributor

check the video - you can see the 8080 being inserted sometimes

chrome_a1xQoH1Arf.mp4

@Hackwar
Copy link
Member

Hackwar commented Sep 23, 2024

Yes, I understand that this is something that you can add to every branch and that it wouldn't be part of any release, but as I said, 4.4-dev is very near its EOL with the next 6 months only being security updates, 5.1-dev is going to be deleted on October 15th and 5.2-dev is only receiving bugfixes for the next 6 months. 5.3-dev would be the way to go.

@alebak
Copy link
Author

alebak commented Sep 23, 2024

check the video - you can see the 8080 being inserted sometimes

chrome_a1xQoH1Arf.mp4

I will check the setup.sh and try again in Codespaces.

@alebak
Copy link
Author

alebak commented Sep 23, 2024

Yes, I understand that this is something that you can add to every branch and that it wouldn't be part of any release, but as I said, 4.4-dev is very near its EOL with the next 6 months only being security updates, 5.1-dev is going to be deleted on October 15th and 5.2-dev is only receiving bugfixes for the next 6 months. 5.3-dev would be the way to go.

Perfect. I will make the corresponding modifications in the 5.3-dev branch.

@alebak
Copy link
Author

alebak commented Sep 23, 2024

I see that at the moment there is no image for Joomla 5.3 in the Docker Hub and the one for Joomla 5.2 is in beta. So I will have to add a Dockerfile to the more general devcontainer or according to the 5.3 version, would the Joomla 5.2 Dockerfile work as is or Joomla 5.3 will have other different minimum requirements to take into account?

@alebak
Copy link
Author

alebak commented Sep 24, 2024

Hello to everyone following this PR!

I think it is not convenient to implement devcontainer if you have an image that you can get from Docker Hub or another Docker registry. From my local it took me more than 5 minutes to build the image.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants