You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #636 [Lazy] - Upgrade lazy stack to PHP8.3 (gfaivre)
This PR was merged into the master branch.
Discussion
----------
[Lazy] - Upgrade lazy stack to PHP8.3
Commits
-------
85c5557 [Lazy] - Upgrade lazy stack to PHP8.3
Copy file name to clipboardexpand all lines: .manala/README.md
+145
Original file line number
Diff line number
Diff line change
@@ -33,3 +33,148 @@ rsync -a /tmp/foo/ ./
33
33
```
34
34
35
35
Browse http://localhost:8080 and enjoy :)
36
+
37
+
## Usage
38
+
39
+
### Shell
40
+
41
+
Open a shell to container
42
+
```shell
43
+
make sh
44
+
```
45
+
46
+
Run commands through container shell
47
+
```shell
48
+
# From file
49
+
make sh < file
50
+
# Multilines, using heredoc
51
+
make sh << 'EOF'
52
+
command 1
53
+
command 2
54
+
...
55
+
EOF
56
+
# Single line
57
+
make sh <<<command
58
+
```
59
+
60
+
Specify working dir
61
+
```shell
62
+
make sh DIR=/etc <<<pwd
63
+
/etc
64
+
```
65
+
66
+
### Makefile
67
+
68
+
One of the first directive of your project's Makefile should be to include manala recipe `Makefile`
69
+
```makefile
70
+
include .manala/Makefile
71
+
```
72
+
73
+
Or, if you're not sure manala recipe directory will be present, make it optional. If you do make it optionnal, you'll have to ensure that every parts of you project's Makefile using manala recipe tools could fallback to another solution.
74
+
```makefile
75
+
-include .manala/Makefile
76
+
```
77
+
78
+
Note: it's a good practise to have a `.SILENT:` as the first line of your project's Makefile. Not only does it globally silence make targets echoing, but it also offers a lowcost debugging system by just commenting it on demand.
79
+
```makefile
80
+
.SILENT:
81
+
```
82
+
```makefile
83
+
#.SILENT:
84
+
```
85
+
86
+
A `MANALA_DOCKER` variable is available to check whether you're inside the container or not
87
+
```makefile
88
+
foo:
89
+
ifdefMANALA_DOCKER
90
+
echo Inside container
91
+
else
92
+
echo Outside container
93
+
endif
94
+
```
95
+
96
+
A `MANALA_DIR` variable is available to get your project's directory *inside* container
echo Can be run *inside* or *outside* container, \
123
+
but always *inside*if manala recipe "Makefile" is included
124
+
```
125
+
126
+
3. Make substitution with `MANALA_DOCKER_MAKE`
127
+
128
+
```makefile
129
+
foo:
130
+
$(MANALA_DOCKER_MAKE) bar
131
+
132
+
bar:
133
+
echo Run *outside* container if called directly \
134
+
or *inside* container if called from "foo"
135
+
```
136
+
137
+
An automagic target help system is included out-of-the-box. You can list all available documented commands with `make help` (or just `make`, as the help command is the default one)
138
+
139
+
```shell
140
+
$ make
141
+
142
+
Usage: make [command]
143
+
144
+
Help:
145
+
help This help
146
+
147
+
System:
148
+
sh Open a local system shell
149
+
clean Clean local system
150
+
```
151
+
152
+
You can add your own documented commands, by adding double dashed comments in your projects's Makefile
0 commit comments