Skip to content

Commit cbb3db3

Browse files
committed
Code for step 2
1 parent be6d65a commit cbb3db3

File tree

7 files changed

+41
-19
lines changed

7 files changed

+41
-19
lines changed

Diff for: config/prod.exs

+1-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ config :logger, level: :info
5555
# If you are doing OTP releases, you need to instruct Phoenix
5656
# to start each relevant endpoint:
5757
#
58-
# config :docker_elixir_19_release, DockerElixir19ReleaseWeb.Endpoint, server: true
58+
config :docker_elixir_19_release, DockerElixir19ReleaseWeb.Endpoint, server: true
5959
#
6060
# Then you can assemble a release by calling `mix release`.
6161
# See `mix help release` for more information.
6262

6363
# Finally import the config/prod.secret.exs which loads secrets
6464
# and configuration from environment variables.
65-
import_config "prod.secret.exs"

Diff for: config/prod.secret.exs

-17
This file was deleted.

Diff for: config/releases.exs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Config
2+
3+
secret_key_base = System.fetch_env!("SECRET_KEY_BASE")
4+
cool_text = System.fetch_env!("COOL_TEXT")
5+
application_port = System.fetch_env!("APP_PORT")
6+
7+
config :docker_elixir_19_release, DockerElixir19ReleaseWeb.Endpoint,
8+
http: [:inet6, port: String.to_integer(application_port)],
9+
secret_key_base: secret_key_base
10+
11+
config :docker_elixir_19_release,
12+
cool_text: cool_text

Diff for: lib/docker_elixir_19_release_web/templates/page/index.html.eex

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<section class="phx-hero">
22
<h1><%= gettext "Welcome to %{name}!", name: "Phoenix" %></h1>
33
<p>A productive web framework that<br/>does not compromise speed or maintainability.</p>
4+
<p><%= Application.get_env(:docker_elixir_19_release, :cool_text) %></p>
45
</section>
56

67
<section class="row">

Diff for: rel/env.bat.eex

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
rem Set the release to work across nodes
3+
rem set RELEASE_DISTRIBUTION=name
4+
rem set RELEASE_NODE=<%= @release.name %>@127.0.0.1

Diff for: rel/env.sh.eex

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
# Sets and enables heart (recommended only in daemon mode)
4+
# if [ "$RELEASE_COMMAND" = "daemon" ] || [ "$RELEASE_COMMAND" = "daemon_iex" ]; then
5+
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
6+
# export HEART_COMMAND
7+
# export ELIXIR_ERL_OPTIONS="-heart"
8+
# fi
9+
10+
# Set the release to work across nodes
11+
# export RELEASE_DISTRIBUTION=name
12+
# export RELEASE_NODE=<%= @release.name %>@127.0.0.1

Diff for: rel/vm.args.eex

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Customize flags given to the VM: http://erlang.org/doc/man/erl.html
2+
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
3+
4+
## Number of dirty schedulers doing IO work (file, sockets, etc)
5+
##+SDio 5
6+
7+
## Increase number of concurrent ports/sockets
8+
##+Q 65536
9+
10+
## Tweak GC to run more often
11+
##-env ERL_FULLSWEEP_AFTER 10

0 commit comments

Comments
 (0)