Skip to content

Commit 2edd8e0

Browse files
committed
docker updates
1 parent 05b43bd commit 2edd8e0

File tree

6 files changed

+127
-70
lines changed

6 files changed

+127
-70
lines changed

.idea/aws.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN apk add --no-cache \
3737
## Installing extensions ##
3838
# Running in a single command is worse for caching/build failures, but far better for image size
3939
RUN docker-php-ext-install \
40-
mysqli pdo_mysql mbstring exif pcntl pdo bcmath opcache ldap zip \
40+
mysqli pdo_mysql mbstring exif pcntl pdo bcmath opcache ldap zip \
4141
&& \
4242
docker-php-ext-enable zip \
4343
&& \

config/crontab

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Run Leantime scheduler every minute
2+
* * * * * php /var/www/html/bin/leantime schedule:run >> /var/log/cron.log 2>&1

config/supervisord.conf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[supervisord]
22
nodaemon=true
3-
logfile=/var/tmp/supervisor.log
3+
logfile=/dev/stdout
4+
loglevel=info
45
logfile_maxbytes=0
56
pidfile=/run/supervisord.pid
67

@@ -22,3 +23,9 @@ autorestart=true
2223
priority=10
2324
startretries=1
2425
numprocs=1
26+
27+
[program:cron]
28+
command=/usr/sbin/crond -f -l 8
29+
autostart=true
30+
autorestart=true
31+
priority=20

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ services:
1212
- leantime-net
1313
command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci
1414

15-
1615
leantime:
1716
image: leantime/leantime:latest
1817
container_name: leantime

sample.env

Lines changed: 105 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ LEAN_DB_PORT = '3306' # Database port
2929
LEAN_SITENAME = 'Leantime' # Name of your site, can be changed later
3030
LEAN_LANGUAGE = 'en-US' # Default language
3131
LEAN_DEFAULT_TIMEZONE = 'America/Los_Angeles' # Set default timezone
32-
LEAN_ENABLE_MENU_TYPE = false # Enable to specifiy menu on a project by project basis
33-
LEAN_SESSION_PASSWORD = '3evBlq9zdUEuzKvVJHWWx3QzsQhturBApxwcws2m' #Salting sessions. Replace with a strong password
32+
LEAN_LOG_PATH = '' # Default Log Path (including filename), if not set /logs/error.log will be used
33+
LEAN_DISABLE_LOGIN_FORM = false # If true then don't show the login form (useful only if additional auth method[s] are available)
34+
35+
## Session Management
36+
LEAN_SESSION_PASSWORD = '3evBlq9zdUEuzKvVJHWWx3QzsQhturBApxwcws2m' # Salting sessions, replace with a strong password
3437
LEAN_SESSION_EXPIRATION = 28800 # How many seconds after inactivity should we logout? 28800seconds = 8hours
35-
LEAN_LOG_PATH = null # Default Log Path (including filename), if not set /logs/error.log will be used
38+
LEAN_SESSION_SECURE = false # Cookies only served via https
3639

3740
## Look & Feel, these settings are available in the UI and can be overwritten there.
38-
LEAN_LOGO_PATH = '/images/logo.svg' # Default logo path, can be changed later
39-
LEAN_PRINT_LOGO_URL = '/images/logo.jpg' # Default logo URL use for printing (must be jpg or png format)
41+
LEAN_LOGO_PATH = '/dist/images/logo.svg' # Default logo path, can be changed later
42+
LEAN_PRINT_LOGO_URL = '/dist/images/logo.png' # Default logo URL use for printing (must be jpg or png format)
4043
LEAN_DEFAULT_THEME = 'default' # Default theme
41-
LEAN_PRIMARY_COLOR = '#1b75bb' # Primary Theme color
42-
LEAN_SECONDARY_COLOR = '#81B1A8' # Secondary Theme Color
44+
LEAN_PRIMARY_COLOR = '#006d9f' # Primary Theme color
45+
LEAN_SECONDARY_COLOR =' #00a886' # Secondary Theme Color
46+
4347

4448
## Fileuploads
4549

@@ -48,14 +52,14 @@ LEAN_USER_FILE_PATH = 'userfiles/' # Local relative path to stor
4852
LEAN_DB_BACKUP_PATH = 'backupdb/' # Local relative path to store backup files, need permission to write
4953

5054
# S3 File Uploads
51-
# LEAN_USE_S3 = false # Set to true if you want to use S3 instead of local files
52-
# LEAN_S3_KEY = '' # S3 Key
53-
# LEAN_S3_SECRET = '' # S3 Secret
54-
# LEAN_S3_BUCKET = '' # Your S3 bucket
55-
# LEAN_S3_USE_PATH_STYLE_ENDPOINT = false # Sets the endpoint style: false => https://[bucket].[endpoint] ; true => https://[endpoint]/[bucket]
56-
# LEAN_S3_REGION = '' # S3 region
57-
# LEAN_S3_FOLDER_NAME = '' # Foldername within S3 (can be emtpy)
58-
# LEAN_S3_END_POINT = null # S3 EndPoint S3 Compatible (https://sfo2.digitaloceanspaces.com)
55+
LEAN_USE_S3 = false # Set to true if you want to use S3 instead of local files
56+
LEAN_S3_KEY = '' # S3 Key
57+
LEAN_S3_SECRET = '' # S3 Secret
58+
LEAN_S3_BUCKET = '' # Your S3 bucket
59+
LEAN_S3_USE_PATH_STYLE_ENDPOINT = false # Sets the endpoint style: false => https://[bucket].[endpoint] ; true => https://[endpoint]/[bucket]
60+
LEAN_S3_REGION = '' # S3 region
61+
LEAN_S3_FOLDER_NAME = '' # Foldername within S3 (can be empty)
62+
LEAN_S3_END_POINT = null # S3 EndPoint S3 Compatible (https://sfo2.digitaloceanspaces.com)
5963

6064
## Email
6165
LEAN_EMAIL_RETURN = '' # Return email address, needs to be valid email address format
@@ -69,73 +73,87 @@ LEAN_EMAIL_SMTP_SECURE = '' # SMTP Security protocol (usu
6973
LEAN_EMAIL_SMTP_SSLNOVERIFY = false # SMTP Allow insecure SSL: Don't verify certificate, accept self-signed, etc.
7074
LEAN_EMAIL_SMTP_PORT = '' # Port (usually one of 25, 465, 587, 2526)
7175

72-
## Ldap
73-
# LEAN_LDAP_USE_LDAP = false # Set to true if you want to use LDAP
74-
# LEAN_LDAP_LDAP_TYPE = 'OL' # Select the correct directory type. Currently Supported: OL - OpenLdap, AD - Active Directory
75-
# LEAN_LDAP_HOST = '' # FQDN
76-
# LEAN_LDAP_PORT = 389 # Default Port
77-
# LEAN_LDAP_DN = '' # Location of users, example: CN=users,DC=example,DC=com
78-
76+
## LDAP
77+
LEAN_LDAP_USE_LDAP = false # Set to true if you want to use LDAP
78+
LEAN_LDAP_LDAP_DOMAIN = '' # Domain name after username@ so users can login without domain definition
79+
LEAN_LDAP_LDAP_TYPE = 'OL' # Select the correct directory type. Currently Supported: OL - OpenLdap, AD - Active Directory
80+
LEAN_LDAP_HOST = '' # FQDN
81+
LEAN_LDAP_PORT = 389 # Default Port
82+
LEAN_LDAP_URI = '' # LDAP URI as alternative to hostname and port. Uses ldap://hostname:port
83+
LEAN_LDAP_DN = '' # Location of users, example: CN=users,DC=example,DC=com
7984
# Leantime->Ldap attribute mapping
80-
# LEAN_LDAP_KEYS="{
81-
# \"username\":\"uid\",
82-
# \"groups\":\"memberOf\",
83-
# \"email\":\"mail\",
84-
# \"firstname\":\"displayname\",
85-
# \"lastname\":\"\",
86-
# \"phonenumber\":\"telephoneNumber\"
87-
# }"
85+
LEAN_LDAP_KEYS="{
86+
\"username\":\"uid\",
87+
\"groups\":\"memberOf\",
88+
\"email\":\"mail\",
89+
\"firstname\":\"displayname\",
90+
\"lastname\":\"\",
91+
\"phone\":\"telephoneNumber\",
92+
\"jobTitle\":\"title\"
93+
\"jobLevel\":\"level\"
94+
\"department\":\"department\"
95+
96+
}"
8897

8998
# For AD use these default attributes
9099
# LEAN_LDAP_KEYS="{
91100
# \"username\":\"cn\",
92-
# \"groups\":\"memberof\",
101+
# \"groups\":\"memberOf\",
93102
# \"email\":\"mail\",
94-
# \"firstname\":\"givenname\",
103+
# \"firstname\":\"givenName\",
95104
# \"lastname\":\"sn\",
96-
# \"phonenumber\":\"telephoneNumber\"
105+
# \"phone\":\"telephoneNumber\",
106+
# \"jobTitle\":\"title\"
107+
# \"jobLevel\":\"level\"
108+
# \"department\":\"department\"
97109
# }"
98110

99-
# LEAN_LDAP_DEFAULT_ROLE_KEY = 20 # Default Leantime Role on creation. (set to editor)
111+
LEAN_LDAP_DEFAULT_ROLE_KEY = 20; # Default Leantime Role on creation. (set to editor)
100112

101113
# Default role assignments upon first login.
102-
# (Optional) Can be updated later in user settings for each user
103-
# LEAN_LDAP_GROUP_ASSIGNMENT="{
104-
# \"5\": {
105-
# \"ltRole\":\"readonly\",
106-
# \"ldapRole\":\"readonly\"
107-
# },
108-
# \"10\": {
109-
# \"ltRole\":\"commenter\",
110-
# \"ldapRole\":\"commenter\"
111-
# },
112-
# \"20\": {
113-
# \"ltRole\":\"editor\",
114-
# \"ldapRole\":\"editor\"
115-
# },
116-
# \"30\": {
117-
# \"ltRole\":\"manager\",
118-
# \"ldapRole\":\"manager\"
119-
# },
120-
# \"40\": {
121-
# \"ltRole\":\"admin\",
122-
# \"ldapRole\":\"administrators\"
123-
# },
124-
# \"50\": {
125-
# \"ltRole\":\"owner\",
126-
# \"ldapRole\":\"administrators\"
127-
# }
128-
# }"
114+
# optional - Can be updated later in user settings for each user
115+
LEAN_LDAP_GROUP_ASSIGNMENT="{
116+
\"5\": {
117+
\"ltRole\":\"readonly\",
118+
\"ldapRole\":\"readonly\"
119+
},
120+
\"10\": {
121+
\"ltRole\":\"commenter\",
122+
\"ldapRole\":\"commenter\"
123+
},
124+
\"20\": {
125+
\"ltRole\":\"editor\",
126+
\"ldapRole\":\"editor\"
127+
},
128+
\"30\": {
129+
\"ltRole\":\"manager\",
130+
\"ldapRole\":\"manager\"
131+
},
132+
\"40\": {
133+
\"ltRole\":\"admin\",
134+
\"ldapRole\":\"administrators\"
135+
},
136+
\"50\": {
137+
\"ltRole\":\"owner\",
138+
\"ldapRole\":\"administrators\"
139+
}
140+
}"
129141

130142
## OpenID Connect
131143
# required
132-
# LEAN_OIDC_ENABLE = false
133-
# LEAN_OIDC_CLIENT_ID =
134-
# LEAN_OIDC_CLIENT_SECRET =
144+
LEAN_OIDC_ENABLE = false
145+
LEAN_OIDC_CLIENT_ID =
146+
LEAN_OIDC_CLIENT_SECRET =
135147

136-
# required - the url for your provider (examples down below)
148+
# required - the URL for your provider (examples down below)
137149
#LEAN_OIDC_PROVIDER_URL =
138150

151+
#Create User if it doesn't exist in Leantime db, otherwise fail login
152+
LEAN_OIDC_CREATE_USER = false
153+
154+
# Default role for users created via OIDC (20 is editor)
155+
LEAN_OIDC_DEFAULT_ROLE = 20
156+
139157
# optional - these will be read from the well-known configuration if possible
140158
#LEAN_OIDC_AUTH_URL_OVERRIDE =
141159
#LEAN_OIDC_TOKEN_URL_OVERRIDE =
@@ -153,12 +171,32 @@ LEAN_EMAIL_SMTP_PORT = '' # Port (usually one of 25, 46
153171
#LEAN_OIDC_FIELD_EMAIL =
154172
#LEAN_OIDC_FIELD_FIRSTNAME =
155173
#LEAN_OIDC_FIELD_LASTNAME =
174+
#LEAN_OIDC_FIELD_PHONE =
175+
#LEAN_OIDC_FIELD_JOBTITLE =
176+
#LEAN_OIDC_FIELD_JOBLEVEL=
177+
#LEAN_OIDC_FIELD_DEPARTMENT =
156178

157-
## OpenID Connect setting for github
179+
## OpenID Connect setting for GitHub
158180
#LEAN_OIDC_PROVIDER_URL = https://token.actions.githubusercontent.com/
159181
#LEAN_OIDC_AUTH_URL_OVERRIDE = https://github.com/login/oauth/authorize
160182
#LEAN_OIDC_TOKEN_URL_OVERRIDE = https://github.com/login/oauth/access_token
161183
#LEAN_OIDC_USERINFO_URL_OVERRIDE = https://api.github.com/user,https://api.github.com/user/emails
162-
#LEAN_OIDC_SCOPES = user:email
184+
#LEAN_OIDC_SCOPES = user:email,read:user
163185
#LEAN_OIDC_FIELD_EMAIL = 0.email
186+
#LEAN_OIDC_FIELD_FIRSTNAME = name
187+
188+
189+
## Redis (for session storage and cache)
190+
LEAN_USE_REDIS = false # Set to true to use redis as session cache
191+
LEAN_REDIS_URL = '' # Add URL path such as tcp://1.2.3.4:6379. If you are using a password, add ?auth=yourverycomplexpasswordhere to your URL
192+
LEAN_REDIS_HOST = ''
193+
LEAN_REDIS_PORT = 6379
194+
LEAN_REDIS_PASSWORD = ''
195+
LEAN_REDIS_SCHEME = ''
196+
197+
## Rate limiting
198+
LEAN_RATELIMIT_GENERAL = 1000
199+
LEAN_RATELIMIT_API = 10
200+
LEAN_RATELIMIT_AUTH = 20
201+
164202

0 commit comments

Comments
 (0)