-
-
Notifications
You must be signed in to change notification settings - Fork 920
Added .devcontainer for GitHub Codespaces. #300
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
Added .devcontainer for GitHub Codespaces. #300
Conversation
I created this .devcontainer because the image that is created does not seem to contain the correct information: I started in opensource in 2013 but the image starts in 2015? But when I tried to create a unit test to check why this was failing in the GitHub codespace I was unable to reproduce this issue. Is the version running on the herokuapp using an older version then the main branch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really neat! Thanks for your help on this 👍 I tried it out on your branch and it is looking pretty good. I had some issues trying to run it with composer start though (the address generated for the port was giving a 502 error), but overall it seems nice. I especially like the creation of the .env and usage of the first run notice.
.devcontainer/Dockerfile
Outdated
ADD first-run-notice.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install -y php php-curl php-imagick php-xml composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation hasn't been updated yet, but php-imagick
is no longer used by the project and inkscape
can be added here instead.
Imagick was originally added for converting SVG to PNG, but while it worked perfectly locally, there were several issues when it came to getting it to work on Heroku. At first (#149), there were errors about unknown decode delegates and then MVG policy issues, eventually those were resolved but it still rendered weirdly (#217) and then stopped working entirely, just producing a blank background (#293). I tried using several Heroku buildpacks for overriding the ImageMagick version, changing the policy, etc, but couldn't get anything to work. I noticed that you've worked on ImageMagick, so maybe you have some idea about this.
In any case, imagick is no longer a dependency at least until I can figure out how to make it work on Heroku, and inkscape
is a new dependency (#298) that I was able to get to work for rendering PNGs locally and on Heroku.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My recommendation would be to use inkscape in your situation. I had to install these packages to make composer install
work because it looks like the composer.json
file still requires this? Maybe that should be changed before this PR gets merged? But also feel free to change that after merging this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be resolved in #301. If you'd like, you can update the base branch so you can make it no longer required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, saw that you just did. Now testing what I need to install in a separate branch. Will update the PR after I am done testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request has been updated.
This seems to me like an issue on GitHub's end. The contribution years are requested from the GitHub API and it seems like it just returns from 2015. Similarly, it seems to stop here on your profile page. The Heroku app is up to date with the main branch, I think it's just the GitHub API being inconsistent. I've experienced similar issues with it in the past. |
Very strange, I suppose if you self host it with your own access token, it might work more accurately for you. As far as I can tell, there isn't much I can do about it since it seems to be an issue with the response from GitHub. |
I am not actually planning to use this image anywhere but I saw it somewhere and noticed that it started at the wrong year so that is why I came here to try and help fix it. But it does look like there is nothing to fix. |
12ffafc
to
3087db3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should be a great start! Thanks for the contribution 🎉
Description
This pull requests adds a devcontainer configuration that will be used when a codespace is started in this repository. This configuration installs the packages that are required to run the unit tests of this project. And it also uses the
$GITHUB_TOKEN
variable that is available in a codespaces to create the.env
file that is used by the unit tests. I have also added a file calledfirst-run-notice.txt
that will be shown when the codespace is started. It might need some more improvements but I will leave that up to the maintainers of this project.When trying to get
composer test
to work I also noticed that I needed different packages to make it work. I don't have enough php experience to know what to change in thecomposer.json
file orREADME.md
so I will leave that up to the maintainers of this projects.Type of change
How Has This Been Tested?
composer test
Checklist: