Commit graph

100 commits

Author SHA1 Message Date
Oliver Davies 1819fa9a97 refactor(justfile): split onto multiple lines 2023-04-12 22:45:56 +01:00
Oliver Davies 1303656f4a fix(justfile): remove hard-coded service name
Add the service name as a parameter and include it from the `phpunit`
recipe.
2023-04-12 22:36:27 +01:00
Oliver Davies 5c6e25a660 feat(justfile): add phpunit recipe
Add a `phpunit` recipe for running PHPUnit tests, with a `test` alias
that could later be used for running Pest in PHP projects or Jest in a
node project.
2023-04-12 22:21:46 +01:00
Oliver Davies d45d0d6616 refactor(justfile): add a run recipe 2023-04-12 22:20:19 +01:00
Oliver Davies 9657ad693e fix: XML error
> XML declaration allowed only at the start of the document
2023-04-11 00:36:02 +01:00
Oliver Davies e3a93065de fix: drupal.docroot can be null 2023-04-07 20:55:23 +01:00
Oliver Davies a97264d99c feat: validate drupal.docroot
Refs: OD-18
2023-04-07 20:39:34 +01:00
Oliver Davies e30929e69c refactor: serialise and validate a configuration
...data object
2023-04-07 20:03:52 +01:00
Oliver Davies a6ff416012 feat: display a list of generated files
Refs: OD-1
2023-04-07 10:29:41 +01:00
Oliver Davies 4d034d9ba2 feat: allow for adding extra databases
Allow for declaring extra databases that should be created when the
project is first started. This is done by adding an `extra_databases`
key to `database`, containing a list of database names.

```yaml
database:
  type: mariadb
  version: 10
  extra_databases:
    - tinhat
    - freshcover
```
2023-04-07 08:40:42 +01:00
Oliver Davies 692151d26c fix: Docker Compose YAML error
Implement the fix from
https://github.com/docker/compose/issues/10411#issuecomment-1488019350.

Refs: OD-12
2023-04-07 01:21:07 +01:00
Oliver Davies 410717bb6b feat(fractal): add more justfile recipes
Add `justfile` recipes to build a production version of Fractal and
sync it to an S3 bucket.
2023-04-01 20:27:15 +01:00
Oliver Davies 9cc2f181ee feat: add hadolint configuration 2023-04-01 20:27:15 +01:00
Oliver Davies 31bf4af68d fix: allow for no docroot for Drupal projects
Some projects don't use a docroot/web/public directory so this needs be
able to be set to `null`. As I can't do this with Twig's `is not
defined` test, I'll need to remove the default `web` value and add it to
the build.yaml file for the appropriate projects.

If I can get this to work in the future, I'll re-add `web` as the
default value as that's the default and most common option.
2023-04-01 20:27:15 +01:00
Oliver Davies af7357b639 refactor: group imports 2023-04-01 20:27:15 +01:00
Oliver Davies 91e9da1454 feat: add command to generate a build file
Creates an initial `build.yaml` file based on the provided project name
and type.

Fixes #32
2023-04-01 20:26:24 +01:00
Oliver Davies eb01ae0790 fix: add DOCKER_UID argument 2023-03-17 16:56:24 +00:00
Oliver Davies fc8474d198 feat: enable Traefik proxy for Fractal 2023-03-17 15:39:33 +00:00
Oliver Davies 7deddd4aa6 refactor: hard-code the build service target name 2023-03-17 14:58:51 +00:00
Oliver Davies fd5af4f397 fix: missing web service 2023-03-14 23:22:05 +00:00
Oliver Davies 474f8129a9 fix: incorrect docroot value 2023-03-14 23:21:57 +00:00
Oliver Davies d865f694fd fix: remove debug code 2023-03-14 23:12:38 +00:00
Oliver Davies 1802fdeb53 fix: incorrect project type 2023-03-14 23:11:59 +00:00
Oliver Davies 62bbe88ffc fix: spacing 2023-03-14 23:11:28 +00:00
Oliver Davies 779206dfdd chore: add a default Drupal docroot 2023-03-14 23:08:25 +00:00
Oliver Davies 39956ee2f5 feat: add .dockerignore 2023-03-14 15:06:13 +00:00
Oliver Davies 7978c03709 feat: initial Laravel support
Refs #17
2023-03-13 21:18:31 +00:00
Oliver Davies cf25359c7b refactor: use mnapoli/silly 2023-03-13 02:00:33 +00:00
Oliver Davies 5c4ddd52a4 feat(justfile): add recipes for node and fractal
Refs: #5
2023-03-12 12:36:59 +00:00
Oliver Davies b4b289748a feat: add initial node support
Refs: #5
2023-03-12 12:33:33 +00:00
Oliver Davies a179f1b0ee refactor: move the PHP Dockerfile 2023-03-12 11:11:45 +00:00
Oliver Davies b6de5bdba6 feat: add fractal as a type
Refs: #5
2023-03-12 11:08:00 +00:00
Oliver Davies f4d5e69f5f feat: add node as a language
Refs: #5
2023-03-12 11:07:21 +00:00
Oliver Davies e223181ab7 test: language should be a supported language 2023-03-11 01:11:21 +00:00
Oliver Davies f25395d877 test: project name should be a string 2023-03-11 01:01:52 +00:00
Oliver Davies de6dc1851c build(deps): add Pest 2023-03-11 00:41:10 +00:00
Oliver Davies 3891774f79 fix: add missing volume to the PHP service 2023-03-10 23:16:39 +00:00
Oliver Davies 25772d512f fix: missing args from the install recipe 2023-03-10 23:16:11 +00:00
Oliver Davies ae8132f0db feat: add root_commands
As well as commands that are run by the `app` user, also specify
commands that should be run by the `root` user such as updating the
`DocumentRoot` within an Apache virtual host.
2023-03-10 23:11:23 +00:00
Oliver Davies 22299f1cc6 feat: disable the web service
Don't create a `web` service in Docker Compose if it has been disabled
in `build.yaml`.

Fixes #28
2023-03-10 22:38:13 +00:00
Oliver Davies 6b5c1b5aee feat: add project_root setting
Allow for overriding the project root from `/app` to something else,
such as `/var/www/html`.

The default is set within a new `build.defaults.yaml` file which the
project specific file is merged into.

Fixes #27
2023-03-10 22:21:14 +00:00
Oliver Davies eeeb70df14 chore: allow for missing fields 2023-03-10 22:10:07 +00:00
Oliver Davies 8b2181525d fix: automatically copy PHPUnit files 2023-03-09 11:51:44 +00:00
Oliver Davies 96a7cd3cef ci: run PHPStan static analysis 2023-03-08 21:58:40 +00:00
Oliver Davies 484ff14d1f ci: initial workflow 2023-03-08 21:57:39 +00:00
Oliver Davies 78411c319c chore: fix PHPStan errors 2023-03-08 21:21:12 +00:00
Oliver Davies 0fcffc5d2f feat: add "auto-generated" text to templates
Fixes #21
2023-03-08 21:13:28 +00:00
Oliver Davies d04169a0d8 feat(justfile): add an install recipe
Fixes #26
2023-03-08 21:08:56 +00:00
Oliver Davies 3449ec5390 feat: add a phpunit.xml.dist file for Drupal
Fixes #15
2023-03-03 21:59:26 +00:00
Oliver Davies 5f1c8afa9c fix: include MySQL variables for Drupal
These environment variables are needed for the initial database to be
created for Drupal.
2023-03-03 21:54:15 +00:00