Open gjnoonan opened 4 years ago
No, I couldn't test it, as I currently don't have a running Docker environment anywhere.... :-( But on paper it looks good. ;-)
I've made a configuration which adds:
Shall I simply push my commits to this branch and merge request?
(Alas, I'm having some trouble with line endings to be able to easily run git from the containers and VSCode...)
Sorry @julmud, it has been a busy week, I've not found as much "free" time as I'd hoped.
My Local branch also fixes the iconv issue. Good to hear you did the .devcontainer, I also started that but did not get it to a point where I was happy with it.
Yep please either push to the branch or send me the patches. I will rebase the commits and provide correct attribution before we merge.
@gjnoonan I've been unsuccessful in pushing directly the commits to your branch or this pull request, so I've sent you an email with the patches. ;-)
@julmud I reviewed your patches earlier, via email :-) if you could rebase against my latest push then they should apply cleanly.
@julmud I reviewed your patches earlier, via email :-) if you could rebase against my latest push then they should apply cleanly.
@gjnoonan Is it normal that the docker-compose.yml
file is missing from your latest commits? And the .env.example
file seems to be missing too.
@julmud I reviewed your patches earlier, via email :-) if you could rebase against my latest push then they should apply cleanly.
@gjnoonan Is it normal that the
docker-compose.yml
file is missing from your latest commits? And the.env.example
file seems to be missing too.
hmm sorry about that, I must not have paid enough attention after my last rebase.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and 2 Security Hotspots to review)
0 Code Smells
No Coverage information
0.0% Duplication
Kudos, SonarCloud Quality Gate passed!
Whilst this works, and is what I have been running locally, it is not quite ready to go into master yet; I still need to rebase and split out the commits. However I thought I would push this up as a draft to allow people to raise comment/suggestions.
I've used alpine as the container as it is lightweight and produces a nice small image and is generally really good for this application. The main error that comes up at the moment is:
I know why the first one errs and the second one can be ignored as it only displays because of the first. At the moment it doesn't stop anything from working. I may switch alpine out for debian if it proves a pain
I've added a Makefile for convenience, I realise that a Powershell file may need to be included too (or indeed a VSCode .devcontainer) for those running windows, but I've had no chance to write/test one.
When you first clone the project and run
make install
it will 1) copy the env.example file to .env 2)Build the docker containers. unless you have deleted the image, it has changed, or you have runreset
this will only happen the first time and will be quite slow. 3) start all the containers in the background.From here all you need to do is visit the webpage via port 8080, upload your Collection.XML via the usual method and then everything is ready to go. You can edit your PHP files locally and the changes will be reflected.
during development you should not have to run
make install
again, just usemake start
andmake stop
MySQL will automatically create the database, and run schema.sql to set-up the required structure once the container has been started.
If you don't want to, or can't run the Makefile then you can run the steps manually:
1) docker pull --parallel 2) docker build --no-cache --pull (the pull here makes sure you have the latest base image and won't use the local one if it exists) 3) docker-compose up 4) profit
On a side note, as part of another patch series/MR I would like introduce a standard Collection.xml fixture into the database to use for development. I have one that I used locally when developing #2. This contains a few Blu-Rays and UltraHD titles; However, if we add a DVD, HD-DVD, as well as a release or two in non-english languages we should have enough to make sure nothing is breaking :-)
note: If you would like to test this out, in your localsiteconfig.php file set
$dbhost = 'db';
this wall of text will be cleaned up into something more cohesive before it is taken out of draft