Skip to content

Commit

Permalink
fix: Don't overwrite deps directories in docker-composeed containers
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarson committed Oct 2, 2024
1 parent 6ba2846 commit 38a39b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deploy/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ services:
timeout: 10s
volumes:
- ../:/app
- /app/deps
- /app/assets/node_modules
networks:
dotcom_network:
ipv4_address: 10.0.0.2
Expand Down Expand Up @@ -83,6 +85,8 @@ services:
timeout: 10s
volumes:
- ../:/app
- /app/deps
- /app/assets/node_modules
networks:
dotcom_network:
ipv4_address: 10.0.0.3
Expand Down
4 changes: 3 additions & 1 deletion deploy/dotcom/dev/1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ COPY mix.exs .
COPY mix.lock .
COPY package.json .
COPY assets/package.json ./assets/package.json
COPY assets/package-lock.json ./assets/package-lock.json

RUN mix local.hex --force
RUN mix local.rebar --force

RUN mix deps.get
RUN npm --prefix assets install --package-lock-only --ignore-scripts --no-save --audit false --fund false --loglevel verbose
RUN npm run install --ignore-scripts --audit false --fund false --loglevel verbose

CMD elixir --sname dotcom1 --cookie foobarbaz -S mix phx.server
9 changes: 9 additions & 0 deletions deploy/dotcom/dev/2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,14 @@ WORKDIR /app

COPY mix.exs .
COPY mix.lock .
COPY package.json .
COPY assets/package.json ./assets/package.json
COPY assets/package-lock.json ./assets/package-lock.json

RUN mix local.hex --force
RUN mix local.rebar --force

RUN mix deps.get
RUN npm run install --ignore-scripts --audit false --fund false --loglevel verbose

CMD elixir --sname dotcom2 --cookie foobarbaz -S mix phx.server

0 comments on commit 38a39b8

Please sign in to comment.