fix(elixir): missing release files

This commit is contained in:
Schuwi
2025-09-16 14:00:56 +02:00
parent ae861f32a1
commit 9366c0a0a0
7 changed files with 60 additions and 5 deletions

3
.gitignore vendored
View File

@@ -38,3 +38,6 @@ npm-debug.log
# Ignore all user-generated content (uploads, QR codes, etc.)
/priv/static/user_generated/
# Ignore customized Docker Compose file.
docker-compose.yml

View File

@@ -230,7 +230,10 @@ mix ecto.migrations
cd components_elixir
```
2. **Build and run with Docker Compose:**
2. **Copy docker-compose.yml.example to docker-compose.yml**
Follow steps in [Customizing Docker Deployment](#customizing-docker-deployment).
3. **Build and run with Docker Compose:**
```bash
docker compose up --build
```
@@ -241,7 +244,7 @@ mix ecto.migrations
- Elixir compiles all dependencies
- Network conditions may significantly affect download speeds
3. **Access the application:**
4. **Access the application:**
- Open [http://localhost:4000](http://localhost:4000)
- Default password: `changeme`

View File

@@ -21,14 +21,19 @@ services:
- "4000:4000"
environment:
DATABASE_URL: "ecto://postgres:postgres@db:5432/components_elixir_prod"
SECRET_KEY_BASE: "WYxST6ZVqFdeXRfjP3MUAc+hNVCJ6LW/+aqwuP27Ab77R4yXFQlO2HsukrOzCVif"
SECRET_KEY_BASE: "your-secret-key-here" # Generate with: mix phx.gen.secret
PHX_HOST: "localhost"
PHX_SERVER: "true"
PORT: "4000"
depends_on:
db:
condition: service_healthy
command: ["/bin/sh", "-c", "/app/bin/migrate && /app/bin/server"]
command:
[
"/bin/sh",
"-c",
"/app/bin/components_elixir eval 'ComponentsElixir.Release.migrate' && /app/bin/components_elixir start",
]
volumes:
postgres_data:
postgres_data:

8
rel/env.bat.eex Normal file
View File

@@ -0,0 +1,8 @@
@echo off
rem Set the release to load code on demand (interactive) instead of preloading (embedded).
rem set RELEASE_MODE=interactive
rem Set the release to work across nodes.
rem RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
rem set RELEASE_DISTRIBUTION=name
rem set RELEASE_NODE=<%= @release.name %>

20
rel/env.sh.eex Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
# # Sets and enables heart (recommended only in daemon mode)
# case $RELEASE_COMMAND in
# daemon*)
# HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
# export HEART_COMMAND
# export ELIXIR_ERL_OPTIONS="-heart"
# ;;
# *)
# ;;
# esac
# # Set the release to load code on demand (interactive) instead of preloading (embedded).
# export RELEASE_MODE=interactive
# # Set the release to work across nodes.
# # RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none".
# export RELEASE_DISTRIBUTION=name
# export RELEASE_NODE=<%= @release.name %>

8
rel/remote.vm.args.eex Normal file
View File

@@ -0,0 +1,8 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10

8
rel/vm.args.eex Normal file
View File

@@ -0,0 +1,8 @@
## Customize flags given to the VM: https://www.erlang.org/doc/man/erl.html
## -mode/-name/-sname/-setcookie are configured via env vars, do not set them here
## Increase number of concurrent ports/sockets
##+Q 65536
## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10