Initial template

This commit is contained in:
hh
2026-09-08 19:15:15 +02:00
commit 5bb12b0a4f
10 changed files with 117 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
COMPOSE_ENV=local
+6
View File
@@ -0,0 +1,6 @@
.env
.env.*
!.env.example
docker-compose.override.yml
.DS_Store
.idea
+16
View File
@@ -0,0 +1,16 @@
repos:
- repo: local
hooks:{% if not parts %} []{% endif %}
{% for part in parts %} - id: {{ part }}-fmt
name: {{ part }} fmt
entry: make -C {{ part }} fmt
language: system
files: ^{{ part }}/
pass_filenames: false
- id: {{ part }}-check
name: {{ part }} check
entry: make -C {{ part }} check
language: system
files: ^{{ part }}/
pass_filenames: false
{% endfor %}
+16
View File
@@ -0,0 +1,16 @@
## Code Principles
- **Simplicity**: Write simple, straightforward code
- **Readability**: Make code easy to understand
- **Performance**: Consider performance without sacrificing readability
- **Maintainability**: Write code that's easy to update
- **Reusability**: Create reusable components and functions
- **Less Code = Less Debt**: Minimize code footprint
- **NEVER write comments** - code should be self-documenting
- **Docstrings ONLY if explicitly asked**
## Checking commands
After writing code, always run:
```shell
make fmt
make check
```
+28
View File
@@ -0,0 +1,28 @@
PARTS := $(patsubst %/Makefile,%,$(wildcard */Makefile))
SERVICES := docker compose --profile services
EXTERNAL := docker compose --profile external
.PHONY: env external recreate rebuild restart logs down fmt check build
env:
@test -f .env || cat .env.example $(addsuffix /.env.example,$(PARTS)) > .env
external:
$(EXTERNAL) up -d
recreate: external
$(SERVICES) up -d --force-recreate
rebuild: build recreate
restart:
$(SERVICES) restart
logs:
$(SERVICES) logs -f --tail=100
down:
$(EXTERNAL) --profile services down
fmt check build:
@for part in $(PARTS); do $(MAKE) -C $$part $@ || exit 1; done
+7
View File
@@ -0,0 +1,7 @@
{% if parts %}include:
{% for part in parts %} - path:
- {{ part }}/docker-compose.yml
- {{ part }}/docker-compose.${COMPOSE_ENV:-local}.yml
project_directory: .
{% endfor %}{% else %}services: {}
{% endif %}
@@ -0,0 +1 @@
{{ _copier_answers|to_nice_yaml -}}