Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Functional Programming
Diskuy-Backend
Commits
a0db0308
Commit
a0db0308
authored
Feb 20, 2021
by
Muhammad Rafif Elfazri
Browse files
Add GUARDIAN_SECRET_KEY_BASE variables for production
parent
a4e7016a
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/docker.env
View file @
a0db0308
SECRET_KEY_BASE=REALLY_LONG_SECRET
GUARDIAN_SECRET_KEY_BASE=REALLY_LONG_SECRET
DATABASE_HOST=db
DATABASE_URL=ecto://postgres:postgres@db/postgres
PORT=4000
...
...
config/releases.exs
View file @
a0db0308
...
...
@@ -23,6 +23,13 @@ secret_key_base =
You can generate one by calling: mix phx.gen.secret
"""
guardian_secret_key_base
=
System
.
get_env
(
"GUARDIAN_SECRET_KEY_BASE"
)
||
raise
"""
environment variable GUARDIAN_SECRET_KEY_BASE is missing.
You can generate one by calling: mix guardian.gen.secret
"""
config
:diskuy
,
DiskuyWeb
.
Endpoint
,
http:
[
port:
String
.
to_integer
(
System
.
get_env
(
"PORT"
)
||
"4000"
),
...
...
@@ -30,6 +37,11 @@ config :diskuy, DiskuyWeb.Endpoint,
],
secret_key_base:
secret_key_base
config
:diskuy
,
DiskuyWeb
.
Auth
.
Guardian
,
issuer:
"diskuy"
,
secret_key:
guardian_secret_key_base
# ## Using releases (Elixir v1.9+)
#
# If you are doing OTP releases, you need to instruct Phoenix
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment