From 9e7499f8e2739894c649ca065e8719fed6823a18 Mon Sep 17 00:00:00 2001 From: Josh Larson Date: Wed, 2 Oct 2024 17:24:42 -0400 Subject: [PATCH] chore: Mount the _build directory as well, run `mix.compile` in the build step, and update the README --- README.md | 2 +- deploy/dev.yml | 2 ++ deploy/dotcom/dev/1/Dockerfile | 1 + deploy/dotcom/dev/2/Dockerfile | 1 + mix.lock | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 49a44f2826..d2313e6493 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ For details on environment configuration, including optional variables, see The easiest way to develop MBTA dotcom is to use Docker Compose. ``` -docker compose -f deploy/dev.yml up -d +docker compose -f deploy/dev.yml up -d --build ``` This will set up Redis in cluster mode and run two versions of Dotcom with nginx load balancing requests between them. diff --git a/deploy/dev.yml b/deploy/dev.yml index 81d09a29cb..e6c1dc2e69 100644 --- a/deploy/dev.yml +++ b/deploy/dev.yml @@ -50,6 +50,7 @@ services: timeout: 10s volumes: - ../:/app + - /app/_build - /app/deps - /app/assets/node_modules networks: @@ -85,6 +86,7 @@ services: timeout: 10s volumes: - ../:/app + - /app/_build - /app/deps - /app/assets/node_modules networks: diff --git a/deploy/dotcom/dev/1/Dockerfile b/deploy/dotcom/dev/1/Dockerfile index e5a46d7b0a..ff8be7c88e 100644 --- a/deploy/dotcom/dev/1/Dockerfile +++ b/deploy/dotcom/dev/1/Dockerfile @@ -16,6 +16,7 @@ RUN mix local.hex --force RUN mix local.rebar --force RUN mix deps.get +RUN mix deps.compile RUN npm install --prefix assets --omit=optional --audit false --fund false --loglevel verbose --ignore-scripts CMD elixir --sname dotcom1 --cookie foobarbaz -S mix phx.server diff --git a/deploy/dotcom/dev/2/Dockerfile b/deploy/dotcom/dev/2/Dockerfile index d9e5a2710a..6fc4720f8b 100644 --- a/deploy/dotcom/dev/2/Dockerfile +++ b/deploy/dotcom/dev/2/Dockerfile @@ -16,6 +16,7 @@ RUN mix local.hex --force RUN mix local.rebar --force RUN mix deps.get +RUN mix deps.compile RUN npm install --prefix assets --omit=optional --audit false --fund false --loglevel verbose --ignore-scripts CMD elixir --sname dotcom2 --cookie foobarbaz -S mix phx.server diff --git a/mix.lock b/mix.lock index 80c3048802..f39bc48a77 100644 --- a/mix.lock +++ b/mix.lock @@ -61,7 +61,7 @@ "mint_web_socket": {:hex, :mint_web_socket, "1.0.4", "0b539116dbb3d3f861cdf5e15e269a933cb501c113a14db7001a3157d96ffafd", [:mix], [{:mint, ">= 1.4.1 and < 2.0.0-0", [hex: :mint, repo: "hexpm", optional: false]}], "hexpm", "027d4c5529c45a4ba0ce27a01c0f35f284a5468519c045ca15f43decb360a991"}, "mochiweb": {:hex, :mochiweb, "3.2.2", "bb435384b3b9fd1f92f2f3fe652ea644432877a3e8a81ed6459ce951e0482ad3", [:rebar3], [], "hexpm", "4114e51f1b44c270b3242d91294fe174ce1ed989100e8b65a1fab58e0cba41d5"}, "mock": {:hex, :mock, "0.3.8", "7046a306b71db2488ef54395eeb74df0a7f335a7caca4a3d3875d1fc81c884dd", [:mix], [{:meck, "~> 0.9.2", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "7fa82364c97617d79bb7d15571193fc0c4fe5afd0c932cef09426b3ee6fe2022"}, - "mox": {:hex, :mox, "1.1.0", "0f5e399649ce9ab7602f72e718305c0f9cdc351190f72844599545e4996af73c", [:mix], [], "hexpm", "d44474c50be02d5b72131070281a5d3895c0e7a95c780e90bc0cfe712f633a13"}, + "mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"}, "nebulex": {:hex, :nebulex, "2.6.3", "78af348ed9f8a338871b41e0b6de718c1808e627ce03fbe86598cbda2bdda2f5", [:mix], [{:decorator, "~> 1.4", [hex: :decorator, repo: "hexpm", optional: true]}, {:shards, "~> 1.1", [hex: :shards, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "09cdcbb62f8463ffcec7cae4936425ce91e25d92a6cd37e48b5dda7c851958d5"}, "nebulex_redis_adapter": {:hex, :nebulex_redis_adapter, "2.4.0", "bebd7aac9fc92378115131b9d90f094c62e5d72869d97191550fb0591d6c1d8a", [:mix], [{:crc, "~> 0.10", [hex: :crc, repo: "hexpm", optional: true]}, {:jchash, "~> 0.1", [hex: :jchash, repo: "hexpm", optional: true]}, {:nebulex, "~> 2.6", [hex: :nebulex, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.5 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:redix, "~> 1.3", [hex: :redix, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "0934142f92b71519fb81324721fab7bc164036c5b91eef7e879a63b98e659814"}, "nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"},