-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revert "Add development docker-compose service (#489)" This reverts commit 88fff09. * Revert "Update dockerfile and add missing nodejs to tools (#486)" This reverts commit 6618b2e.
- Loading branch information
Showing
15 changed files
with
254 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
/.github | ||
/.pgdata/ | ||
/_build/ | ||
/assets/node_modules/ | ||
/deps/ | ||
/doc/ | ||
/priv/static/assets | ||
/test/ | ||
/tmp/ | ||
/.pgdata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
elixir 1.13.1-otp-24 | ||
erlang 24.3.3 | ||
nodejs 16.14.1 | ||
erlang 24.3.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
FROM registry.opensuse.org/opensuse/leap:15.4 AS system | ||
FROM opensuse/leap AS elixir-build | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
RUN zypper -n addrepo https://download.opensuse.org/repositories/devel:/languages:/erlang/15.4/devel:languages:erlang.repo &&\ | ||
zypper -n --gpg-auto-import-keys ref -s &&\ | ||
zypper -n in inotify-tools elixir nodejs16 npm16 | ||
WORKDIR /source | ||
RUN mix local.rebar --force &&\ | ||
mix local.hex --force | ||
|
||
FROM system AS deps | ||
RUN zypper -n addrepo https://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_15_SP3/devel:languages:erlang.repo | ||
RUN zypper -n --gpg-auto-import-keys ref -s | ||
RUN zypper -n in elixir | ||
COPY . /build | ||
WORKDIR /build | ||
ENV MIX_ENV=prod | ||
COPY ./mix.* /source/ | ||
COPY assets/package*.json /source/assets/ | ||
RUN mix install | ||
RUN mix local.rebar --force \ | ||
&& mix local.hex --force \ | ||
&& mix deps.get | ||
|
||
FROM deps AS full | ||
LABEL org.opencontainers.image.version="rolling-full" | ||
LABEL org.opencontainers.image.source="https://github.com/trento-project/web" | ||
COPY . /source | ||
RUN mix assets.deploy &&\ | ||
mix release --path /app | ||
WORKDIR /app | ||
EXPOSE 4000/tcp | ||
ENTRYPOINT ["/app/bin/trento"] | ||
FROM registry.suse.com/bci/nodejs:16 AS assets-build | ||
COPY --from=elixir-build /build /build | ||
WORKDIR /build/assets | ||
RUN npm install | ||
RUN npm run tailwind:build | ||
RUN npm run build | ||
|
||
FROM elixir-build AS release | ||
COPY --from=assets-build /build /build | ||
WORKDIR /build | ||
ENV MIX_ENV=prod | ||
RUN mix phx.digest | ||
RUN mix release | ||
|
||
FROM registry.suse.com/bci/bci-base:15.4 AS minimal | ||
LABEL org.opencontainers.image.version="rolling" | ||
FROM registry.suse.com/bci/bci-base:15.3 AS trento | ||
LABEL org.opencontainers.image.source="https://github.com/trento-project/web" | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
# tar is required by kubectl cp | ||
RUN zypper -n in tar | ||
WORKDIR /app | ||
COPY --from=full /app . | ||
COPY --from=release /build/_build/prod/rel/trento . | ||
EXPOSE 4000/tcp | ||
ENTRYPOINT ["/app/bin/trento"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,15 @@ | |
# General application configuration | ||
import Config | ||
|
||
config :trento, | ||
ecto_repos: [Trento.Repo] | ||
|
||
# Configures the endpoint | ||
config :trento, TrentoWeb.Endpoint, | ||
http: [ | ||
# Enable IPv6 and bind on all interfaces. | ||
# Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access. | ||
# See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html | ||
# for details about using IPv6 vs IPv4 and loopback vs public addresses. | ||
ip: {0, 0, 0, 0, 0, 0, 0, 0}, | ||
port: 4000 | ||
], | ||
url: [host: "localhost"], | ||
render_errors: [view: TrentoWeb.ErrorView, accepts: ~w(html json), layout: false], | ||
pubsub_server: Trento.PubSub | ||
pubsub_server: Trento.PubSub, | ||
live_view: [signing_salt: "4tNZ+tm7"] | ||
|
||
# Configures the mailer | ||
# | ||
|
@@ -32,7 +29,10 @@ config :trento, Trento.Mailer, adapter: Swoosh.Adapters.Local | |
# Swoosh API client is needed for adapters other than SMTP. | ||
config :swoosh, :api_client, false | ||
|
||
config :trento, :alerting, enabled: true | ||
# configure the recipient for alert notifications | ||
config :trento, :alerting, | ||
enabled: true, | ||
recipient: "[email protected]" | ||
|
||
# Configure esbuild (the version is required) | ||
config :esbuild, | ||
|
@@ -60,16 +60,10 @@ config :trento, Trento.Commanded, | |
pubsub: :local, | ||
registry: :local | ||
|
||
config :trento, | ||
ecto_repos: [Trento.Repo] | ||
|
||
config :trento, Trento.Repo, pool_size: 10 | ||
|
||
config :trento, Trento.EventStore, | ||
serializer: Trento.JsonbSerializer, | ||
column_data_type: "jsonb", | ||
types: EventStore.PostgresTypes, | ||
pool_size: 10 | ||
types: EventStore.PostgresTypes | ||
|
||
config :trento, event_stores: [Trento.EventStore] | ||
|
||
|
@@ -112,7 +106,12 @@ config :trento, Trento.Scheduler, | |
config :trento, Trento.Integration.Telemetry, adapter: Trento.Integration.Telemetry.Suse | ||
config :trento, Trento.Integration.Checks, adapter: Trento.Integration.Checks.Runner | ||
|
||
config :trento, :grafana, dashboards: ["node_exporter"] | ||
config :trento, :grafana, | ||
user: "admin", | ||
password: "admin", | ||
public_url: "http://localhost:3000", | ||
api_url: "http://localhost:3000/api", | ||
dashboards: ["node_exporter"] | ||
|
||
config :trento, | ||
uuid_namespace: "fb92284e-aa5e-47f6-a883-bf9469e7a0dc", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,22 @@ import Config | |
|
||
# Configure your database | ||
config :trento, Trento.Repo, | ||
url: "postgres://postgres@localhost:5432/trento_dev", | ||
username: "postgres", | ||
password: "postgres", | ||
database: "trento_dev", | ||
hostname: "localhost", | ||
port: 5433, | ||
show_sensitive_data_on_connection_error: true, | ||
pool_size: 10, | ||
log: false | ||
|
||
config :trento, Trento.EventStore, | ||
url: "postgres://postgres@localhost:5432/trento_eventstore_dev", | ||
show_sensitive_data_on_connection_error: true, | ||
log: false | ||
username: "postgres", | ||
password: "postgres", | ||
database: "trento_eventstore_dev", | ||
hostname: "localhost", | ||
port: 5433, | ||
pool_size: 10 | ||
|
||
# For development, we disable any cache and enable | ||
# debugging and code reloading. | ||
|
@@ -18,11 +26,13 @@ config :trento, Trento.EventStore, | |
# watchers to your application. For example, we use it | ||
# with esbuild to bundle .js and .css sources. | ||
config :trento, TrentoWeb.Endpoint, | ||
# Binding to loopback ipv4 address prevents access from other machines. | ||
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines. | ||
http: [ip: {0, 0, 0, 0}, port: 4000], | ||
check_origin: false, | ||
code_reloader: true, | ||
debug_errors: true, | ||
secret_key_base: "s2ZdE+3+ke1USHEJ5O45KT364KiXPYaB9cJPdH3p60t8yT0nkLexLBNw8TFSzC7k", | ||
live_view: [signing_salt: "4tNZ+tm7"], | ||
watchers: [ | ||
node: [ | ||
"build.js", | ||
|
@@ -100,13 +110,3 @@ config :phoenix, :stacktrace_depth, 20 | |
config :phoenix, :plug_init_mode, :runtime | ||
|
||
config :trento, :api_key_authentication, enabled: false | ||
|
||
config :trento, :grafana, | ||
user: "admin", | ||
password: "admin", | ||
public_url: "http://localhost:3000", | ||
api_url: "http://localhost:3000/api" | ||
|
||
config :trento, Trento.Integration.Checks.Runner, runner_url: "http://localhost:8080" | ||
|
||
config :trento, :alerting, recipient: "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.