From 4b4b1551636888db6d7ffd35286b2c492e8eeba0 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Mon, 26 Feb 2024 21:33:09 +0100 Subject: [PATCH 1/2] Dev workflow improvements Switch completely to docker based workflow, so that contributors do not have to install tools like python on their host machines. --- Dockerfile | 8 ++++---- README.md | 5 ++--- docker-compose.yaml | 10 ++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56f7b04..2416c9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM php:8.2-apache +FROM php:8.3-apache COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer COPY docker/php/vhost.conf /etc/apache2/sites-available/000-default.conf RUN apt-get update && apt-get install -y \ - unzip \ - git \ - && rm -rf /var/lib/apt/lists/* + unzip \ + git \ + && rm -rf /var/lib/apt/lists/* RUN a2enmod rewrite && a2enmod headers RUN docker-php-ext-install pdo_mysql diff --git a/README.md b/README.md index 28780d6..bfda62f 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,8 @@ Has the source for psalm.dev ## To build docs (for local preview) -- Run `composer update` (requires [Composer](https://getcomposer.org)) -- Run `mkdocs build` (requires Python & [MkDocs](https://www.mkdocs.org/)) +- Or `docker-compose run --rm mkdocs build` ## To build styles (these files get committed) -- Run `npx webpack` (requires Node) +- Run `docker-compose exec node npx webpack` diff --git a/docker-compose.yaml b/docker-compose.yaml index 4e80fe6..01a5926 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -46,5 +46,15 @@ services: networks: - backend + mkdocs: + container_name: mkdocs + image: squidfunk/mkdocs-material + profiles: + - cli # not an actual profile, just to make sure it's not started automatically + volumes: + - type: bind + source: "${PWD}" + target: /docs + networks: backend: From 3b582c14c4bc946be06112a5ac8b03fa0e9a1859 Mon Sep 17 00:00:00 2001 From: Bruce Weirdan Date: Mon, 26 Feb 2024 21:43:15 +0100 Subject: [PATCH 2/2] Document npm packages installation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index bfda62f..e8f69bd 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,5 @@ Has the source for psalm.dev ## To build styles (these files get committed) +- Run `docker-compose exec node npm ci` - Run `docker-compose exec node npx webpack`