Skip to content

Commit 87dcbec

Browse files
committed
a bunch of changes
1 parent 231229a commit 87dcbec

File tree

11 files changed

+2883
-1270
lines changed

11 files changed

+2883
-1270
lines changed

Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ RUN apt-get update && \
99
rm -rf /var/lib/apt/lists/*
1010

1111
# Now it's safe to run mix commands
12-
RUN mix do local.hex --force, local.rebar --force
12+
RUN mix do local.hex --force, local.rebar --force
13+
14+
# Copy the entire application
15+
COPY . .
16+
17+
# Install Elixir dependencies
18+
RUN mix deps.get
19+
20+
# Install npm dependencies
21+
RUN cd assets && npm install

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,3 @@
6666
- After the merge of your pull request is done, you can delete your branch.
6767

6868
---
69-
70-
## Deployment Notes
71-
72-
The `topics/` directory, which contains all the code examples, is crucial for the application's functionality. The provided `Dockerfile` ensures that this directory is copied into the Docker image during the build process. The application then locates this directory at runtime using application-aware path construction (specifically, `Path.join(Application.app_dir(:code_comparison), "topics")`), making its access reliable in containerized environments like Render.
73-
74-
### `SECRET_KEY_BASE` Handling
75-
76-
The `SECRET_KEY_BASE` environment variable is critical for Phoenix applications.
77-
- **Build Time**: The `Dockerfile` includes a temporary, dummy `SECRET_KEY_BASE` to ensure that asset compilation and other build tasks complete successfully when `MIX_ENV=prod`.
78-
- **Runtime**: For your actual deployment on Render (or any other hosting environment), you **must** set a unique and strong `SECRET_KEY_BASE` as an environment variable. This runtime variable will be used by the running application, overriding the temporary one used during the build. You can generate a new secret using `mix phx.gen.secret`.

0 commit comments

Comments
 (0)