Repository navigation
feat(docker): add a development environment - #38
Merged
Merged
Conversation
PHP-Apache (8.2 to 8.4) and MariaDB with a health check, based on the setup used to test the Simply packages. Apache runs with the uid/gid of the host user so that it can write in the mounted project on Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MariaDB image refuses to create a user named root, and a root database account is a poor default anyway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s and show database errors The development site (admin/admin, errors displayed) was published on every interface. A missing .env started MariaDB without database nor user. setup.sh hid the real database error and depended on its executable bit, which Composer drops when unzip is not installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Étape 6b de la feuille de route. Le dépôt
simply-dockerest cassé et n'est plus maintenu depuis mars 2024 :root/rootsont commités ;Décision prise : livrer un environnement de développement dans le boilerplate, construit sur le montage du site de test qui sert depuis le début de la remise à niveau, puis archiver
simply-docker.Changements
compose.yaml:db: MariaDB 11.4 avec un healthcheck, et un mot de passe root aléatoire ;web: PHP-Apache en 8.4 par défaut, réglable avecPHP_VERSION(8.2 à 8.4) ;DB_NAME,DB_USERetDB_PASSWORDdans le.envdu projet, et s'arrête avec un message clair s'ils manquent ;127.0.0.1(HTTP_PORT, 8080 par défaut).docker/:Dockerfile: extensions WordPress, Composer, WP-CLI 2.12.www-dataest remappé surUSER_ID/GROUP_IDpour pouvoir écrire dans le projet monté sous Linux ;vhost.conf: la racine estweb/, le PHP est interdit dans les uploads, et les.yaml/.locksont refusés ;php.ini: réglages de développement.docker/setup.sh(bash docker/setup.sh), qu'on peut relancer sans risque :generateme;composer install;DB_HOST=db,docker compose down -v) ;.env.example:DB_USER/DB_PASSWORDpassent derootàwordpress. MariaDB refuse de créer un utilisateurroot, et un compte root est de toute façon un mauvais défaut.bin/console.Environnement réservé au développement, comme le dit le README : erreurs affichées, compte
admin/admin.Vérification
J'ai créé des projets jetables à partir de l'archive git de la branche, comme le ferait
create-project(sans.github/), sur macOS avec OrbStack :--wait;setup.shinstalle WordPress, et le relancer ne change rien ;simply:;.lockà 403,.envinaccessible ;.env: arrêt de Compose avec un message clair ;setup.shnon exécutable :bash docker/setup.shfonctionne ;Access deniedest affichée.Relecture indépendante : 4 points importants (port exposé,
.envmanquant, bit exécutable, erreur masquée), tous corrigés et vérifiés.🤖 Generated with Claude Code