Skip to content

Commit ebe5d64

Browse files
committed
Simplified example env and created full example copy
1 parent e66ddbc commit ebe5d64

File tree

4 files changed

+227
-83
lines changed

4 files changed

+227
-83
lines changed

.env.example

Lines changed: 14 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,29 @@
1-
# Environment
2-
APP_ENV=production
3-
APP_DEBUG=false
1+
# Application key
2+
# Used for encryption where needed.
3+
# Run `php artisan key:generate` to generate a valid key.
44
APP_KEY=SomeRandomString
55

6-
# The below url has to be set if using social auth options
7-
# or if you are not using BookStack at the root path of your domain.
8-
# APP_URL=http://bookstack.dev
6+
# Application URL
7+
# This must be the root URL that you want to host BookStack on.
8+
# All URL's in BookStack will be generated using this value.
9+
APP_URL=https://example.com
910

1011
# Database details
1112
DB_HOST=localhost
1213
DB_DATABASE=database_database
1314
DB_USERNAME=database_username
1415
DB_PASSWORD=database_user_password
1516

16-
# Cache and session
17-
CACHE_DRIVER=file
18-
SESSION_DRIVER=file
19-
# If using Memcached, comment the above and uncomment these
20-
#CACHE_DRIVER=memcached
21-
#SESSION_DRIVER=memcached
22-
QUEUE_DRIVER=sync
23-
# A different prefix is useful when multiple BookStack instances use the same caching server
24-
CACHE_PREFIX=bookstack
25-
26-
# Memcached settings
27-
# If using a UNIX socket path for the host, set the port to 0
28-
# This follows the following format: HOST:PORT:WEIGHT
29-
# For multiple servers separate with a comma
30-
MEMCACHED_SERVERS=127.0.0.1:11211:100
31-
32-
# Storage
33-
STORAGE_TYPE=local
34-
# Amazon S3 Config
35-
STORAGE_S3_KEY=false
36-
STORAGE_S3_SECRET=false
37-
STORAGE_S3_REGION=false
38-
STORAGE_S3_BUCKET=false
39-
# Storage URL
40-
# Used to prefix image urls for when using custom domains/cdns
41-
STORAGE_URL=false
42-
43-
# General auth
44-
AUTH_METHOD=standard
45-
46-
# Social Authentication information. Defaults as off.
47-
GITHUB_APP_ID=false
48-
GITHUB_APP_SECRET=false
49-
GOOGLE_APP_ID=false
50-
GOOGLE_APP_SECRET=false
51-
GOOGLE_SELECT_ACCOUNT=false
52-
OKTA_BASE_URL=false
53-
OKTA_APP_ID=false
54-
OKTA_APP_SECRET=false
55-
TWITCH_APP_ID=false
56-
TWITCH_APP_SECRET=false
57-
GITLAB_APP_ID=false
58-
GITLAB_APP_SECRET=false
59-
GITLAB_BASE_URI=false
60-
DISCORD_APP_ID=false
61-
DISCORD_APP_SECRET=false
62-
63-
64-
# Disable default services such as Gravatar and Draw.IO
65-
DISABLE_EXTERNAL_SERVICES=false
66-
# Use custom avatar service, Sets fetch URL
67-
# Possible placeholders: ${hash} ${size} ${email}
68-
# If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
69-
# AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
70-
71-
# LDAP Settings
72-
LDAP_SERVER=false
73-
LDAP_BASE_DN=false
74-
LDAP_DN=false
75-
LDAP_PASS=false
76-
LDAP_USER_FILTER=false
77-
LDAP_VERSION=false
78-
# Do you want to sync LDAP groups to BookStack roles for a user
79-
LDAP_USER_TO_GROUPS=false
80-
# What is the LDAP attribute for group memberships
81-
LDAP_GROUP_ATTRIBUTE="memberOf"
82-
# Would you like to remove users from roles on BookStack if they do not match on LDAP
83-
# If false, the ldap groups-roles sync will only add users to roles
84-
LDAP_REMOVE_FROM_GROUPS=false
85-
# Set this option to disable LDAPS Certificate Verification
86-
LDAP_TLS_INSECURE=false
87-
88-
# Mail settings
17+
# Mail system to use
18+
# Can be 'smtp', 'mail' or 'sendmail'
8919
MAIL_DRIVER=smtp
20+
21+
# SMTP mail options
9022
MAIL_HOST=localhost
9123
MAIL_PORT=1025
9224
MAIL_USERNAME=null
9325
MAIL_PASSWORD=null
9426
MAIL_ENCRYPTION=null
95-
MAIL_FROM=null
96-
MAIL_FROM_NAME=null
27+
28+
29+
# A full list of options can be found in the '.env.example.complete' file.

.env.example.complete

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# Full list of environment variables that can be used with BookStack.
2+
# Selectively copy these to your '.env' file as required.
3+
# Each option is shown with it's default value.
4+
# Do not copy this whole file to use as your '.env' file.
5+
6+
# Application environment
7+
# Can be 'production', 'development', 'testing' or 'demo'
8+
APP_ENV=production
9+
10+
# Enable debug mode
11+
# Shows advanced debug information and errors.
12+
# CAN EXPOSE OTHER VARIABLES, LEAVE DISABLED
13+
APP_DEBUG=false
14+
15+
# Application key
16+
# Used for encryption where needed.
17+
# Run `php artisan key:generate` to generate a valid key.
18+
APP_KEY=SomeRandomString
19+
20+
# Application URL
21+
# This must be the root URL that you want to host BookStack on.
22+
# All URL's in BookStack will be generated using this value.
23+
APP_URL=https://example.com
24+
25+
# Application default language
26+
# The default language choice to show.
27+
# May be overridden by user-preference or visitor browser settings.
28+
APP_LANG=en
29+
30+
# Auto-detect language for public visitors.
31+
# Uses browser-sent headers to infer a language.
32+
# APP_LANG will be used if such a header is not provided.
33+
APP_AUTO_LANG_PUBLIC=true
34+
35+
# Database details
36+
# Host can contain a port (localhost:3306) or a separate DB_PORT option can be used.
37+
DB_HOST=localhost
38+
DB_PORT=3306
39+
DB_DATABASE=database_database
40+
DB_USERNAME=database_username
41+
DB_PASSWORD=database_user_password
42+
43+
# Mail system to use
44+
# Can be 'smtp', 'mail' or 'sendmail'
45+
MAIL_DRIVER=smtp
46+
47+
# Mail sending options
48+
MAIL_FROM=mail@bookstackapp.com
49+
MAIL_FROM_NAME=BookStack
50+
51+
# SMTP mail options
52+
MAIL_HOST=localhost
53+
MAIL_PORT=1025
54+
MAIL_USERNAME=null
55+
MAIL_PASSWORD=null
56+
MAIL_ENCRYPTION=null
57+
58+
# Cache & Session driver to use
59+
# Can be 'file', 'database', 'memcached' or 'redis'
60+
CACHE_DRIVER=file
61+
SESSION_DRIVER=file
62+
63+
# Session configuration
64+
SESSION_LIFETIME=120
65+
SESSION_COOKIE_NAME=bookstack_session
66+
SESSION_SECURE_COOKIE=false
67+
68+
# Cache key prefix
69+
# Can be used to prevent conflicts multiple BookStack instances use the same store.
70+
CACHE_PREFIX=bookstack
71+
72+
# Memcached server configuration
73+
# If using a UNIX socket path for the host, set the port to 0
74+
# This follows the following format: HOST:PORT:WEIGHT
75+
# For multiple servers separate with a comma
76+
MEMCACHED_SERVERS=127.0.0.1:11211:100
77+
78+
# Queue driver to use
79+
# Queue not really currently used but may be configurable in the future.
80+
# Would advise not to change this for now.
81+
QUEUE_DRIVER=sync
82+
83+
# Storage system to use
84+
# Can be 'local', 'local_secure' or 's3'
85+
STORAGE_TYPE=local
86+
87+
# Amazon S3 storage configuration
88+
STORAGE_S3_KEY=your-s3-key
89+
STORAGE_S3_SECRET=your-s3-secret
90+
STORAGE_S3_BUCKET=s3-bucket-name
91+
STORAGE_S3_REGION=s3-bucket-region
92+
93+
# Storage URL prefix
94+
# Used as a base for any generated image urls.
95+
# An s3-format URL will be generated if not set.
96+
STORAGE_URL=false
97+
98+
# Authentication method to use
99+
# Can be 'standard' or 'ldap'
100+
AUTH_METHOD=standard
101+
102+
# Social authentication configuration
103+
# All disabled by default.
104+
# Refer to https://www.bookstackapp.com/docs/admin/third-party-auth/
105+
106+
AZURE_APP_ID=false
107+
AZURE_APP_SECRET=false
108+
AZURE_TENANT=false
109+
AZURE_AUTO_REGISTER=false
110+
AZURE_AUTO_CONFIRM_EMAIL=false
111+
112+
DISCORD_APP_ID=false
113+
DISCORD_APP_SECRET=false
114+
DISCORD_AUTO_REGISTER=false
115+
DISCORD_AUTO_CONFIRM_EMAIL=false
116+
117+
FACEBOOK_APP_ID=false
118+
FACEBOOK_APP_SECRET=false
119+
FACEBOOK_AUTO_REGISTER=false
120+
FACEBOOK_AUTO_CONFIRM_EMAIL=false
121+
122+
GITHUB_APP_ID=false
123+
GITHUB_APP_SECRET=false
124+
GITHUB_AUTO_REGISTER=false
125+
GITHUB_AUTO_CONFIRM_EMAIL=false
126+
127+
GITLAB_APP_ID=false
128+
GITLAB_APP_SECRET=false
129+
GITLAB_BASE_URI=false
130+
GITLAB_AUTO_REGISTER=false
131+
GITLAB_AUTO_CONFIRM_EMAIL=false
132+
133+
GOOGLE_APP_ID=false
134+
GOOGLE_APP_SECRET=false
135+
GOOGLE_SELECT_ACCOUNT=false
136+
GOOGLE_AUTO_REGISTER=false
137+
GOOGLE_AUTO_CONFIRM_EMAIL=false
138+
139+
OKTA_BASE_URL=false
140+
OKTA_APP_ID=false
141+
OKTA_APP_SECRET=false
142+
OKTA_AUTO_REGISTER=false
143+
OKTA_AUTO_CONFIRM_EMAIL=false
144+
145+
SLACK_APP_ID=false
146+
SLACK_APP_SECRET=false
147+
SLACK_AUTO_REGISTER=false
148+
SLACK_AUTO_CONFIRM_EMAIL=false
149+
150+
TWITCH_APP_ID=false
151+
TWITCH_APP_SECRET=false
152+
TWITCH_AUTO_REGISTER=false
153+
TWITCH_AUTO_CONFIRM_EMAIL=false
154+
155+
TWITTER_APP_ID=false
156+
TWITTER_APP_SECRET=false
157+
TWITTER_AUTO_REGISTER=false
158+
TWITTER_AUTO_CONFIRM_EMAIL=false
159+
160+
# LDAP authentication configuration
161+
# Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
162+
LDAP_SERVER=false
163+
LDAP_BASE_DN=false
164+
LDAP_DN=false
165+
LDAP_PASS=false
166+
LDAP_USER_FILTER=false
167+
LDAP_VERSION=false
168+
LDAP_TLS_INSECURE=false
169+
LDAP_EMAIL_ATTRIBUTE=mail
170+
LDAP_FOLLOW_REFERRALS=true
171+
172+
# LDAP group sync configuration
173+
# Refer to https://www.bookstackapp.com/docs/admin/ldap-auth/
174+
LDAP_USER_TO_GROUPS=false
175+
LDAP_GROUP_ATTRIBUTE="memberOf"
176+
LDAP_REMOVE_FROM_GROUPS=false
177+
178+
# Disable default third-party services such as Gravatar and Draw.IO
179+
# Service-specific options will override this option
180+
DISABLE_EXTERNAL_SERVICES=false
181+
182+
# Use custom avatar service, Sets fetch URL
183+
# Possible placeholders: ${hash} ${size} ${email}
184+
# If set, Avatars will be fetched regardless of DISABLE_EXTERNAL_SERVICES option.
185+
# Example: AVATAR_URL=https://seccdn.libravatar.org/avatar/${hash}?s=${size}&d=identicon
186+
AVATAR_URL=
187+
188+
# Enable Draw.io integration
189+
DRAWIO=true
190+
191+
# Default item listing view
192+
# Used for public visitors and user's without a preference
193+
# Can be 'list' or 'grid'
194+
APP_VIEWS_BOOKS=list
195+
APP_VIEWS_BOOKSHELVES=grid
196+
197+
# Page revision limit
198+
# Number of page revisions to keep in the system before deleting old revisions.
199+
# If set to 'false' a limit will not be enforced.
200+
REVISION_LIMIT=50
201+
202+
# Allow <script> tags in page content
203+
# Note, if set to 'true' the page editor may still escape scripts.
204+
ALLOW_CONTENT_SCRIPTS=false
205+
206+
# Indicate if robots/crawlers should crawl your instance.
207+
# Can be 'true', 'false' or 'null'.
208+
# The behaviour of the default 'null' option will depend on the 'app-public' admin setting.
209+
# Contents of the robots.txt file can be overridden, making this option obsolete.
210+
ALLOW_ROBOTS=null
211+

config/app.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
// Set the default view type for various lists. Can be overridden by user preferences.
2323
// These will be used for public viewers and users that have not set a preference.
2424
'views' => [
25-
'books' => env('APP_VIEWS_BOOKS', 'list')
25+
'books' => env('APP_VIEWS_BOOKS', 'list'),
26+
'bookshelves' => env('APP_VIEWS_BOOKSHELVES', 'grid'),
2627
],
2728

2829
// The number of revisions to keep in the database.

config/session.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// Options: file, cookie, database, redis, memcached, array
1515
'driver' => env('SESSION_DRIVER', 'file'),
1616

17-
1817
// Session lifetime, in minutes
1918
'lifetime' => env('SESSION_LIFETIME', 120),
2019

0 commit comments

Comments
 (0)