Skip to content
Snippets Groups Projects
Commit d5094135 authored by Axel Hahn's avatar Axel Hahn
Browse files

update docs

parent 36701b36
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,9 @@ The init script: ...@@ -11,7 +11,9 @@ The init script:
* sets permisssions for container and local user * sets permisssions for container and local user
* generates needed files for docker from configuration and a set of templates * generates needed files for docker from configuration and a set of templates
* starts/ stops your container * starts/ stops your container
* opens a console
* starts php lint
# What problems does it not solve? # What problems does it not solve?
It is a script for a dual container and Apache + PHP and Mariadb only. Nothing else. It is a script for a dual container and Apache + PHP and (optional) Mariadb only. Nothing else.
...@@ -4,4 +4,4 @@ It was tested on Linux only. ...@@ -4,4 +4,4 @@ It was tested on Linux only.
* Bash + GNU cure utilities * Bash + GNU cure utilities
* Docker Non-root installation - see <https://docs.docker.com/engine/security/rootless/> * Docker Non-root installation - see <https://docs.docker.com/engine/security/rootless/>
* ACL to enable write permissions on web data for Apache httpd in the container container and local user (you) * ACL to enable write permissions on web data for Apache httpd in the container container and local user (you)
\ No newline at end of file
...@@ -12,7 +12,7 @@ There is a menu offerning a key and the description for its action. If an action ...@@ -12,7 +12,7 @@ There is a menu offerning a key and the description for its action. If an action
The script supports command line parameters to use it in scripts. Use `-h` to get a help: The script supports command line parameters to use it in scripts. Use `-h` to get a help:
```txt ```txt
INITIALIZER FOR DOCKER APP v1.9 INITIALIZER FOR DOCKER APP v1.10
A helper script written in Bash to bring up a PHP+Mysql application in docker. A helper script written in Bash to bring up a PHP+Mysql application in docker.
...@@ -49,6 +49,7 @@ MENU KEYS: ...@@ -49,6 +49,7 @@ MENU KEYS:
m - more infos m - more infos
o - open app [my_new_app] http://localhost:8001/ o - open app [my_new_app] http://localhost:8001/
c - console (bash) c - console (bash)
p - console check with php linter
q - quit q - quit
...@@ -57,5 +58,77 @@ EXAMPLES: ...@@ -57,5 +58,77 @@ EXAMPLES:
init.sh starts interactive mode init.sh starts interactive mode
init.sh u bring up docker container(s) and stay in interactive mode init.sh u bring up docker container(s) and stay in interactive mode
init.sh i q set write permissions and quit init.sh i q set write permissions and quit
init.sh p q start php linter and exit
``` ```
\ No newline at end of file
### Actions
#### g - remove git data of starterkit
After cloning the starter kit repo for a new project you don't want to commit project data to the starter kit but to your project.
This feature removes the git directory if it is connected with the starter kit repository.
If you initialized another project it will bedetected and this feature does nothing.
#### i - init application: set permissions
On a rootless docker setup you need to set the write permission for the `www-data` user and your current desktop user.
#### t - generate files from templates
Insite the docker/templates directory are templates.
**Rules**:
* in the first line must be a line `# TARGET: [name of target file]` to define the target file
* Placeholdrs have the syntax variable in double brackets, i.e. `{{VARNAME}}`
* variables to be replaced are those in docker/init.sh.cfg and `{{genrator}}`
This feature generates the files from the templates and puts them in the correct place.
#### T - remove generated files
This feature removes the files generated by the `t` action.
#### u - startup containers docker-compose ... up -d
Fast start webserver container and database container (if enabled).
#### U - startup containers docker-compose ... up -d --build
Build and start webserver container and database container (if enabled).
#### s - shutdown containers docker-compose stop
Shut down your containers.
#### r - remove containers docker-compose rm -f
Remove your containers.
#### m - more infos
Show processes.
#### o - open app [my_new_app] http://localhost:NNNN/
Start a browser and open the application.
This feature uses the command `xdg-open` to run on Linux.
#### c - console (bash)
Open a console and start a Bash inside webserver container.
If you have a database container too then you get a selection for the first.
You need to type `exit` and press `Return` to return to the menu.
#### p - console check with php linter
Start a docker command on the webserver container and start php lint for all php files:
`find . -name '*.php' -exec php -l {} \; | grep -v '^No syntax errors detected'`
Starting from PHP 8.3 php -l supports multiple files. A newer PHP version will be detected to use the faster mode automatically:
`php -l $( find . -name '*.php' ) | grep -v '^No syntax errors detected'`
\ No newline at end of file
docs/images/main_menu.png

338 KiB | W: | H:

docs/images/main_menu.png

189 KiB | W: | H:

docs/images/main_menu.png
docs/images/main_menu.png
docs/images/main_menu.png
docs/images/main_menu.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment