fix(elixir): missing release files
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -38,3 +38,6 @@ npm-debug.log
|
|||||||
# Ignore all user-generated content (uploads, QR codes, etc.)
|
# Ignore all user-generated content (uploads, QR codes, etc.)
|
||||||
/priv/static/user_generated/
|
/priv/static/user_generated/
|
||||||
|
|
||||||
|
# Ignore customized Docker Compose file.
|
||||||
|
docker-compose.yml
|
||||||
|
|
||||||
|
|||||||
@@ -230,7 +230,10 @@ mix ecto.migrations
|
|||||||
cd components_elixir
|
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
|
```bash
|
||||||
docker compose up --build
|
docker compose up --build
|
||||||
```
|
```
|
||||||
@@ -241,7 +244,7 @@ mix ecto.migrations
|
|||||||
- Elixir compiles all dependencies
|
- Elixir compiles all dependencies
|
||||||
- Network conditions may significantly affect download speeds
|
- Network conditions may significantly affect download speeds
|
||||||
|
|
||||||
3. **Access the application:**
|
4. **Access the application:**
|
||||||
- Open [http://localhost:4000](http://localhost:4000)
|
- Open [http://localhost:4000](http://localhost:4000)
|
||||||
- Default password: `changeme`
|
- Default password: `changeme`
|
||||||
|
|
||||||
|
|||||||
@@ -21,14 +21,19 @@ services:
|
|||||||
- "4000:4000"
|
- "4000:4000"
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: "ecto://postgres:postgres@db:5432/components_elixir_prod"
|
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_HOST: "localhost"
|
||||||
PHX_SERVER: "true"
|
PHX_SERVER: "true"
|
||||||
PORT: "4000"
|
PORT: "4000"
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
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:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
8
rel/env.bat.eex
Normal file
8
rel/env.bat.eex
Normal 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
20
rel/env.sh.eex
Normal 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
8
rel/remote.vm.args.eex
Normal 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
8
rel/vm.args.eex
Normal 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
|
||||||
Reference in New Issue
Block a user