Table of Contents
Installation with a local Docker service
For development a docker environment is part of the repository data. You can use it for a first view on your own machine before installing it.
Requirements
- Linux system
- a running rootless Docker service
- tools/ packages:
- Git
- Docker-compose
- facl to set ACL for write permissions for your user and the webservice of the container
- sudo permssions
- to set ACL permissions with setfacl
- to remove tmp data
Get Sources
As your local user execute the following steps:
cd [somewhere]
git https://git-repo.iml.unibe.ch/iml-open-source/imldeployment.git
cd imldeployment
Prepare and bring up container
Quick method
Set permissions, update templates and start the container:
./docker/init.sh i t u q
OR do in step by step like described in the chapters below.
Set permissions
In the folder docker
are all configurations and helpers to run a docker container.
In it is an init.sh
to set environment.
./docker/init.sh
You get a menu.
>>>>> MENU
g - remove git data of starterkit
i - init application: set permissions
t - generate files from templates
T - remove generated files
u - startup containers docker-compose up -d
s - shutdown containers docker-compose stop
r - remove containers docker-compose rm -f
m - more infos
c - console (bash)
select >
Then press i
and Return
to set permissions.
This sets the acl permissions for the subdirs
- public_html
- config
- data
You will see something like that:
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../public_html'
--- ../public_html
+ sudo setfacl -bR ../public_html
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../public_html
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../public_html
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../config'
--- ../config
+ sudo setfacl -bR ../config
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../config
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../config
+ for mywritedir in ${WRITABLEDIR}
+ echo '--- ../data'
--- ../data
+ sudo setfacl -bR ../data
+ sudo setfacl -dRm u:231104:rwx,axel:rwx ../data
+ sudo setfacl -Rm u:231104:rwx,axel:rwx ../data
+ set +vx
Start container
Then press u
and Return
to run docker-compuse up
.
On the 1st run it needs to download the PHP docker image with Apache httpd and takes a few more seconds.
If ist is up you can run http://localhost:8002/ in your webbrowser.
Change port
If you need to change the port then stop a running container.
Edit docker/init.sh.cfg
and set a new port
...
# web port 80 in container is seen on localhost as ...
APP_PORT=8002
...
After any change in init.sh.cfg we update the configs with
./docker/init.sh t u q
Then press t
(generate files from templates) + Return
.
If you start the container again the application is available under the new port.
The key u
brings up the container.