Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Criando estrutura inicial para app catalogo #120

Merged
merged 7 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN mix local.hex --force && \
ENV MIX_ENV="prod"

COPY mix.exs mix.lock ./
COPY apps/catalogo/mix.exs ./apps/catalogo/
COPY apps/database/mix.exs ./apps/database/
COPY apps/seeder/mix.exs ./apps/seeder/
COPY apps/proxy_web/mix.exs ./apps/proxy_web/
Expand All @@ -28,6 +29,7 @@ COPY apps/plataforma_digital/mix.exs ./apps/plataforma_digital/
COPY apps/plataforma_digital_api/mix.exs ./apps/plataforma_digital_api/
COPY apps/cotacoes/mix.exs ./apps/cotacoes/


RUN mix deps.get --only $MIX_ENV
RUN mkdir config

Expand All @@ -36,11 +38,13 @@ COPY config/config.exs config/${MIX_ENV}.exs config/
RUN mix deps.compile

COPY apps/identidades/priv ./apps/identidades/priv
COPY apps/catalogo/priv ./apps/catalogo/priv
COPY apps/modulo_pesquisa/priv ./apps/modulo_pesquisa/priv
COPY apps/plataforma_digital/priv ./apps/plataforma_digital/priv
COPY apps/cotacoes/priv ./apps/cotacoes/priv

COPY apps/database/lib ./apps/database/lib
COPY apps/catalogo/lib ./apps/catalogo/lib
COPY apps/seeder/lib ./apps/seeder/lib
COPY apps/proxy_web/lib ./apps/proxy_web/lib
COPY apps/identidades/lib ./apps/identidades/lib
Expand Down
5 changes: 5 additions & 0 deletions apps/catalogo/.formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
import_deps: [:ecto, :ecto_sql],
subdirectories: ["priv/*/migrations"],
inputs: ["*.{ex,exs}", "{lib,test}/**/*.{ex,exs}", "priv/*/seeds.exs"]
]
26 changes: 26 additions & 0 deletions apps/catalogo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The directory Mix will write compiled artifacts to.
/_build/

# If you run "mix test --cover", coverage assets end up here.
/cover/

# The directory Mix downloads your dependencies sources to.
/deps/

# Where 3rd-party dependencies like ExDoc output generated docs.
/doc/

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez

# Temporary files, for example, from tests.
/tmp/

# Ignore package tarball (built via "mix hex.build").
identidades-*.tar
Empty file.
Empty file.
44 changes: 44 additions & 0 deletions apps/catalogo/mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
defmodule Catalogo.MixProject do
use Mix.Project

def project do
[
app: :catalogo,
version: "0.1.0",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases()
]
end

def application do
[extra_applications: [:logger, :runtime_tools]]
end

# Specifies which paths to compile per environment.
defp elixirc_paths(e) when e in ~w(dev test)a, do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

defp deps do
[
{:ecto_sql, "~> 3.4"},
{:postgrex, ">= 0.0.0"},
{:ex_machina, "~> 2.7.0"},
{:database, in_umbrella: true}
]
end

defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/ecto_repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]
]
end
end
Loading
Loading