It is also possible to run Leantime within a subfolder (eg. yourcompany.com/leantime). For subfolder installation follow the steps below:
For Apache: If you are using apache, in addition to the Apache package based installation from here, execute the following steps:
- Modify the
public/.htaccess
file as below:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /subfolder
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
The RewriteBase directive tells Apache the base URL path for rewriting. Replace /subfolder
with your actual folder path.
- In the
config/.env
file, theLEAN_APP_URL
variable need to be set to include your subfolder.
LEAN_APP_URL = 'https://yourcompany.com/subfolder'
For Nginx: Copy the nginx-subfoler.example.conf
file, and place it in the Nginx configuration directory. Make the necessary changes and enable configuration as given here in Nginx section.
Then similar to above, the LEAN_APP_URL
in config/.env
should be changed.
Security considerations: Please keep in mind, installing Leantime in a subfolder makes the /userfiles
directory publicly accessible. Access to these files should be restricted by using .htaccess rules. Additionally, you could also put route redirects where needed.
-
MySQL for ARM: We suggest you use
beercan1989/arm-mysql:5.7
. Otherwise you can also install mariadb on the host following this guide -
The entrypoint (start.sh) for the image on docker hub does not compile for arm. You will need to clone the repo and build the image locally (following the steps above).
-
Now you need to fuss with getting access to the database from inside the container. When a user for the database is created, don't use @'localhost'. Use @'%' or replace % with the subdomain/IP of your docker container. If you failed to do this, you'll need to fix it using the GRANT command.
-
Make sure the mariadb is configured to setup the TCP port, by commenting out the bind-address in the configs. #bind-address=127.0.0.1, For me this was found in the file /etc/mysql/mariadb.conf.d/50-server.cnf, then restart mariadb sudo systemctl restart mariadb.service if you had to change this.
-
Finally, we have a slightly modified run command. I added the --add-host=docker:xxx.xxx.xxx.xxx option and removed the --network, making the -e DB_HOST=docker. Basically I kept a default bridged network with the host, but this allows the container to resolve the IP of your host.
Thank you @lamping7 for providing this guide!