v1.4
Browse files- Dockerfile +4 -2
- config/dev.exs +30 -0
- config/test.exs +14 -0
Dockerfile
CHANGED
|
@@ -17,13 +17,15 @@ RUN mkdir -p priv/static/assets priv/static/images
|
|
| 17 |
# Copy mix files
|
| 18 |
COPY mix.exs mix.lock ./
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
# Install mix dependencies
|
| 21 |
RUN mix deps.get
|
| 22 |
|
| 23 |
-
# Copy
|
| 24 |
COPY assets assets
|
| 25 |
COPY priv priv
|
| 26 |
-
COPY config config
|
| 27 |
COPY lib lib
|
| 28 |
|
| 29 |
# Compile the project
|
|
|
|
| 17 |
# Copy mix files
|
| 18 |
COPY mix.exs mix.lock ./
|
| 19 |
|
| 20 |
+
# Copy config files first
|
| 21 |
+
COPY config config
|
| 22 |
+
|
| 23 |
# Install mix dependencies
|
| 24 |
RUN mix deps.get
|
| 25 |
|
| 26 |
+
# Copy the rest of the application
|
| 27 |
COPY assets assets
|
| 28 |
COPY priv priv
|
|
|
|
| 29 |
COPY lib lib
|
| 30 |
|
| 31 |
# Compile the project
|
config/dev.exs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Config
|
| 2 |
+
|
| 3 |
+
# Configure your database
|
| 4 |
+
config :hexalixir, HexalixirWeb.Endpoint,
|
| 5 |
+
# Binding to loopback ipv4 address prevents access from other machines.
|
| 6 |
+
http: [ip: {127, 0, 0, 1}, port: 7860],
|
| 7 |
+
check_origin: false,
|
| 8 |
+
code_reloader: true,
|
| 9 |
+
debug_errors: true,
|
| 10 |
+
secret_key_base: "YOUR_DEV_SECRET_KEY_BASE",
|
| 11 |
+
watchers: [
|
| 12 |
+
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
|
| 13 |
+
tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}
|
| 14 |
+
]
|
| 15 |
+
|
| 16 |
+
# Watch static and templates for browser reloading.
|
| 17 |
+
config :hexalixir, HexalixirWeb.Endpoint,
|
| 18 |
+
live_reload: [
|
| 19 |
+
patterns: [
|
| 20 |
+
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
| 21 |
+
~r"lib/hexalixir_web/(controllers|live|components)/.*(ex|heex)$",
|
| 22 |
+
~r"lib/hexalixir_web/templates/.*(eex|heex)$"
|
| 23 |
+
]
|
| 24 |
+
]
|
| 25 |
+
|
| 26 |
+
# Do not include metadata nor timestamps in development logs
|
| 27 |
+
config :logger, :console, format: "[$level] $message\n"
|
| 28 |
+
|
| 29 |
+
# Initialize plugs at runtime for faster development compilation
|
| 30 |
+
config :phoenix, :plug_init_mode, :runtime
|
config/test.exs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import Config
|
| 2 |
+
|
| 3 |
+
# We don't run a server during test. If one is required,
|
| 4 |
+
# you can enable the server option below.
|
| 5 |
+
config :hexalixir, HexalixirWeb.Endpoint,
|
| 6 |
+
http: [ip: {127, 0, 0, 1}, port: 7860],
|
| 7 |
+
secret_key_base: "test_secret_key_base",
|
| 8 |
+
server: false
|
| 9 |
+
|
| 10 |
+
# Print only warnings and errors during test
|
| 11 |
+
config :logger, level: :warning
|
| 12 |
+
|
| 13 |
+
# Initialize plugs at runtime for faster test compilation
|
| 14 |
+
config :phoenix, :plug_init_mode, :runtime
|