mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-25 09:20:59 +00:00
Bump for latest gen.release
This commit is contained in:
parent
63504e6cce
commit
5b81181ea3
7 changed files with 21 additions and 16 deletions
|
@ -10,9 +10,9 @@
|
||||||
# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
|
# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
|
||||||
# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20210902-slim - for the release image
|
# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20210902-slim - for the release image
|
||||||
# - https://pkgs.org/ - resource for finding needed packages
|
# - https://pkgs.org/ - resource for finding needed packages
|
||||||
# - Ex: hexpm/elixir:1.12.3-erlang-24.1.4-debian-bullseye-20210902-slim
|
# - Ex: hexpm/elixir:1.12.0-erlang-24.0.1-debian-bullseye-20210902-slim
|
||||||
#
|
#
|
||||||
ARG BUILDER_IMAGE="hexpm/elixir:1.12.3-erlang-24.1.4-debian-bullseye-20210902-slim"
|
ARG BUILDER_IMAGE="hexpm/elixir:1.12.0-erlang-24.0.1-debian-bullseye-20210902-slim"
|
||||||
ARG RUNNER_IMAGE="debian:bullseye-20210902-slim"
|
ARG RUNNER_IMAGE="debian:bullseye-20210902-slim"
|
||||||
|
|
||||||
FROM ${BUILDER_IMAGE} as builder
|
FROM ${BUILDER_IMAGE} as builder
|
||||||
|
@ -86,4 +86,8 @@ COPY --from=builder --chown=nobody:root /app/_build/prod/rel/live_beats ./
|
||||||
|
|
||||||
USER nobody
|
USER nobody
|
||||||
|
|
||||||
|
# Set the runtime ENV
|
||||||
|
ENV ECTO_IPV6="true"
|
||||||
|
ENV ERL_AFLAGS="-proto_dist inet6_tcp"
|
||||||
|
|
||||||
CMD /app/bin/server
|
CMD /app/bin/server
|
|
@ -6,6 +6,11 @@ import Config
|
||||||
# and secrets from environment variables or elsewhere. Do not define
|
# and secrets from environment variables or elsewhere. Do not define
|
||||||
# any compile-time configuration in here, as it won't be applied.
|
# any compile-time configuration in here, as it won't be applied.
|
||||||
# The block below contains prod specific runtime configuration.
|
# The block below contains prod specific runtime configuration.
|
||||||
|
|
||||||
|
if System.get_env("PHX_SERVER") && System.get_env("RELEASE_NAME") do
|
||||||
|
config :live_beats, LiveBeatsWeb.Endpoint, server: true
|
||||||
|
end
|
||||||
|
|
||||||
if config_env() == :prod do
|
if config_env() == :prod do
|
||||||
database_url =
|
database_url =
|
||||||
System.get_env("DATABASE_URL") ||
|
System.get_env("DATABASE_URL") ||
|
||||||
|
@ -14,7 +19,6 @@ if config_env() == :prod do
|
||||||
For example: ecto://USER:PASS@HOST/DATABASE
|
For example: ecto://USER:PASS@HOST/DATABASE
|
||||||
"""
|
"""
|
||||||
|
|
||||||
server? = System.get_env("PHX_SERVER") == "true"
|
|
||||||
host = System.get_env("PHX_HOST") || "example.com"
|
host = System.get_env("PHX_HOST") || "example.com"
|
||||||
ecto_ipv6? = System.get_env("ECTO_IPV6") == "true"
|
ecto_ipv6? = System.get_env("ECTO_IPV6") == "true"
|
||||||
|
|
||||||
|
@ -31,7 +35,6 @@ if config_env() == :prod do
|
||||||
You can generate one by calling: mix phx.gen.secret
|
You can generate one by calling: mix phx.gen.secret
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
config :live_beats, LiveBeatsWeb.Endpoint,
|
config :live_beats, LiveBeatsWeb.Endpoint,
|
||||||
url: [host: host, port: 80],
|
url: [host: host, port: 80],
|
||||||
http: [
|
http: [
|
||||||
|
@ -42,16 +45,13 @@ if config_env() == :prod do
|
||||||
ip: {0, 0, 0, 0, 0, 0, 0, 0},
|
ip: {0, 0, 0, 0, 0, 0, 0, 0},
|
||||||
port: String.to_integer(System.get_env("PORT") || "4000")
|
port: String.to_integer(System.get_env("PORT") || "4000")
|
||||||
],
|
],
|
||||||
secret_key_base: secret_key_base,
|
secret_key_base: secret_key_base
|
||||||
server: server?
|
|
||||||
|
|
||||||
config :live_beats, :files, [
|
config :live_beats, :files,
|
||||||
uploads_dir: "/app/uploads",
|
uploads_dir: "/app/uploads",
|
||||||
host: [scheme: "https", host: host, port: 443],
|
host: [scheme: "https", host: host, port: 443]
|
||||||
]
|
|
||||||
|
|
||||||
config :live_beats, :github, [
|
config :live_beats, :github,
|
||||||
client_id: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_ID"),
|
client_id: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_ID"),
|
||||||
client_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET"),
|
client_secret: System.fetch_env!("LIVE_BEATS_GITHUB_CLIENT_SECRET")
|
||||||
]
|
|
||||||
end
|
end
|
||||||
|
|
2
fly.toml
2
fly.toml
|
@ -9,8 +9,6 @@ processes = []
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
PHX_HOST = "livebeats.fly.dev"
|
PHX_HOST = "livebeats.fly.dev"
|
||||||
ECTO_IPV6 = "true"
|
|
||||||
ERL_AFLAGS = "-proto_dist inet6_tcp"
|
|
||||||
|
|
||||||
[mounts]
|
[mounts]
|
||||||
source="data"
|
source="data"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd -P -- "$(dirname -- "$0")"
|
cd -P -- "$(dirname -- "$0")"
|
||||||
./live_beats eval LiveBeats.Release.migrate
|
exec ./live_beats eval LiveBeats.Release.migrate
|
1
rel/overlays/bin/migrate.bat
Executable file
1
rel/overlays/bin/migrate.bat
Executable file
|
@ -0,0 +1 @@
|
||||||
|
call "%~dp0\live_beats" eval LiveBeats.Release.migrate
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd -P -- "$(dirname -- "$0")"
|
cd -P -- "$(dirname -- "$0")"
|
||||||
PHX_SERVER=true ./live_beats start
|
PHX_SERVER=true exec ./live_beats start
|
||||||
|
|
2
rel/overlays/bin/server.bat
Executable file
2
rel/overlays/bin/server.bat
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
set PHX_SERVER=true
|
||||||
|
call "%~dp0\live_beats" start
|
Loading…
Reference in a new issue