Skip to content

Commit b059231

Browse files
authored
Merge pull request #366 from sinipelto/patch-1
Separate env variables to a separate env file for docker compose
2 parents 23adc32 + bd51caf commit b059231

File tree

3 files changed

+171
-1
lines changed

3 files changed

+171
-1
lines changed

docker/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TAG=latest

docker/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
version: "3"
22
services:
33
2fauth:
4-
image: 2fauth/2fauth
4+
env_file: settings.env
5+
image: 2fauth/2fauth:${TAG:-latest}
56
container_name: 2fauth
67
volumes:
78
- ./2fauth:/2fauth

docker/settings.env

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# You can change the name of the app
2+
APP_NAME=2FAuth
3+
4+
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
5+
# Never set it to "testing".
6+
APP_ENV=local
7+
8+
# The timezone for your application, which is used to record dates and times to database. This global setting can be
9+
# overridden by users via in-app settings for a personalised dates and times display.
10+
# If this setting is changed while the application is already running, existing records in the database won't be updated
11+
APP_TIMEZONE=UTC
12+
13+
# Set to true if you want to see debug information in error screens.
14+
APP_DEBUG=false
15+
16+
# This should be your email address
17+
18+
19+
# The encryption key for our database and sessions. Keep this very secure.
20+
# If you generate a new one all existing data must be considered LOST.
21+
# Change it to a string of exactly 32 chars or use command `php artisan key:generate` to generate it
22+
APP_KEY=SomeRandomStringOf32CharsExactly
23+
24+
# This variable must match your installation's external address.
25+
# Webauthn won't work otherwise.
26+
APP_URL=http://localhost
27+
28+
# If you want to serve js assets from a CDN (like https://cdn.example.com),
29+
# uncomment the following line and set this var with the CDN url.
30+
# Otherwise, let this line commented.
31+
# ASSET_URL=http://localhost
32+
33+
# Turn this to true if you want your app to react like a demo.
34+
# The Demo mode reset the app content every hours and set a generic demo user.
35+
IS_DEMO_APP=false
36+
37+
# The log channel defines where your log entries go to.
38+
# 'daily' is the default logging mode giving you 7 daily rotated log files in /storage/logs/.
39+
# Also available are 'errorlog', 'syslog', 'stderr', 'papertrail', 'slack' and a 'stack' channel
40+
# to combine multiple channels into a single one.
41+
LOG_CHANNEL=daily
42+
43+
# Log level. You can set this from least severe to most severe:
44+
# debug, info, notice, warning, error, critical, alert, emergency
45+
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
46+
# nothing will get logged, ever.
47+
LOG_LEVEL=notice
48+
49+
# Database config (can only be sqlite)
50+
DB_DATABASE="/srv/database/database.sqlite"
51+
52+
# If you're looking for performance improvements, you could install memcached.
53+
CACHE_DRIVER=file
54+
SESSION_DRIVER=file
55+
56+
# Mail settings
57+
# Refer your email provider documentation to configure your mail settings
58+
# Set a value for every available setting to avoid issue
59+
MAIL_MAILER=log
60+
MAIL_HOST=smtp.mailtrap.io
61+
MAIL_PORT=2525
62+
MAIL_USERNAME=null
63+
MAIL_PASSWORD=null
64+
MAIL_ENCRYPTION=null
65+
MAIL_FROM_NAME=null
66+
MAIL_FROM_ADDRESS=null
67+
68+
# SSL peer verification.
69+
# Set this to false to disable the SSL certificate validation.
70+
# WARNING
71+
# Disabling peer verification can result in a major security flaw.
72+
# Change it only if you know what you're doing.
73+
MAIL_VERIFY_SSL_PEER=true
74+
75+
# API settings
76+
# The maximum number of API calls in a minute from the same IP.
77+
# Once reached, all requests from this IP will be rejected until the minute has elapsed.
78+
# Set to null to disable the API throttling.
79+
THROTTLE_API=60
80+
81+
# Authentication settings
82+
# The number of times per minute a user can fail to log in before being locked out.
83+
# Once reached, all login attempts will be rejected until the minute has elapsed.
84+
# This setting applies to both email/password and webauthn login attemps.
85+
LOGIN_THROTTLE=5
86+
87+
# The default authentication guard
88+
# Supported:
89+
# 'web-guard' : The Laravel built-in auth system (default if nulled)
90+
# 'reverse-proxy-guard' : When 2FAuth is deployed behind a reverse-proxy that handle authentication
91+
# WARNING
92+
# When using 'reverse-proxy-guard' 2FAuth only look for the dedicated headers and skip all other built-in
93+
# authentication checks. That means your proxy is fully responsible of the authentication process, 2FAuth will
94+
# trust him as long as headers are presents.
95+
AUTHENTICATION_GUARD=web-guard
96+
97+
# Authentication log retention time, in days.
98+
# Log entries older than that are automatically deleted.
99+
AUTHENTICATION_LOG_RETENTION=365
100+
101+
# Name of the HTTP headers sent by the reverse proxy that identifies the authenticated user at proxy level.
102+
# Check your proxy documentation to find out how these headers are named (i.e 'REMOTE_USER', 'REMOTE_EMAIL', etc...)
103+
# (only relevant when AUTHENTICATION_GUARD is set to 'reverse-proxy-guard')
104+
AUTH_PROXY_HEADER_FOR_USER=null
105+
AUTH_PROXY_HEADER_FOR_EMAIL=null
106+
107+
# Custom logout URL to open when using an auth proxy.
108+
PROXY_LOGOUT_URL=null
109+
110+
# WebAuthn settings
111+
# Relying Party name, aka the name of the application. If blank, defaults to APP_NAME. Do not set to null.
112+
WEBAUTHN_NAME=2FAuth
113+
114+
# Relying Party ID, should equal the site domain (i.e 2fauth.example.com).
115+
# If null, the device will fill it internally (recommended)
116+
# See https://webauthn-doc.spomky-labs.com/prerequisites/the-relying-party#how-to-determine-the-relying-party-id
117+
WEBAUTHN_ID=null
118+
119+
# Use this setting to control how user verification behave during the
120+
# WebAuthn authentication flow.
121+
#
122+
# Most authenticators and smartphones will ask the user to actively verify
123+
# themselves for log in. For example, through a touch plus pin code,
124+
# password entry, or biometric recognition (e.g., presenting a fingerprint).
125+
# The intent is to distinguish one user from any other.
126+
#
127+
# Supported:
128+
# 'required': Will ALWAYS ask for user verification
129+
# 'preferred' (default) : Will ask for user verification IF POSSIBLE
130+
# 'discouraged' : Will NOT ask for user verification (for example, to minimize disruption to the user interaction flow)
131+
WEBAUTHN_USER_VERIFICATION=preferred
132+
133+
#### SSO settings (for Socialite) ####
134+
# Uncomment and complete lines for the OAuth providers you want to enable.
135+
# OPENID_AUTHORIZE_URL=
136+
# OPENID_TOKEN_URL=
137+
# OPENID_USERINFO_URL=
138+
# OPENID_CLIENT_ID=
139+
# OPENID_CLIENT_SECRET=
140+
# GITHUB_CLIENT_ID=
141+
# GITHUB_CLIENT_SECRET=
142+
143+
# Use this setting to declare trusted proxied.
144+
# Supported:
145+
# '*': to trust any proxy
146+
# A comma separated IP list: The list of proxies IP to trust
147+
TRUSTED_PROXIES=null
148+
149+
# Proxy for outgoing requests like new releases detection or logo fetching.
150+
# You can provide a proxy URL that contains a scheme, username, and password.
151+
# For example, "http://username:[email protected]:10".
152+
PROXY_FOR_OUTGOING_REQUESTS=null
153+
154+
# Leave the following configuration vars as is.
155+
# Unless you like to tinker and know what you're doing.
156+
BROADCAST_DRIVER=log
157+
QUEUE_DRIVER=sync
158+
SESSION_LIFETIME=120
159+
REDIS_HOST=127.0.0.1
160+
REDIS_PASSWORD=null
161+
REDIS_PORT=6379
162+
PUSHER_APP_ID=
163+
PUSHER_APP_KEY=
164+
PUSHER_APP_SECRET=
165+
PUSHER_APP_CLUSTER=mt1
166+
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
167+
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
168+
MIX_ENV=local

0 commit comments

Comments
 (0)