Skip to content

Commit d4241c7

Browse files
Add bundle check in Dockerfile (#21)
* add bundle check * remove stuff from compose * clean up * update image tag
1 parent 0f4d2eb commit d4241c7

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

deploy/docker-compose/docker-compose.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ services:
2222
networks:
2323
- storedog-net
2424
web:
25-
image: public.ecr.aws/x2b9z2t7/storedog/backend:1.0.1
26-
command: bash -c "rm -rf tmp/pids/server.pid && bundle exec rails s -b 0.0.0.0 -p 4000"
25+
image: public.ecr.aws/x2b9z2t7/storedog/backend:1.0.4
2726
depends_on:
2827
- 'postgres'
2928
- 'redis'
@@ -39,7 +38,7 @@ services:
3938
networks:
4039
- storedog-net
4140
worker:
42-
image: public.ecr.aws/x2b9z2t7/storedog/backend:1.0.1
41+
image: public.ecr.aws/x2b9z2t7/storedog/backend:1.0.4
4342
command: bundle exec sidekiq -C config/sidekiq.yml
4443
depends_on:
4544
- 'postgres'
@@ -55,7 +54,7 @@ services:
5554
networks:
5655
- storedog-net
5756
ads:
58-
image: public.ecr.aws/x2b9z2t7/storedog/ads:1.0.1
57+
image: public.ecr.aws/x2b9z2t7/storedog/ads:1.0.4
5958
command: flask run --port=${ADS_PORT} --host=0.0.0.0
6059
depends_on:
6160
- postgres
@@ -75,7 +74,7 @@ services:
7574
networks:
7675
- storedog-net
7776
discounts:
78-
image: public.ecr.aws/x2b9z2t7/storedog/discounts:1.0.1
77+
image: public.ecr.aws/x2b9z2t7/storedog/discounts:1.0.4
7978
command: flask run --port=${DISCOUNTS_PORT} --host=0.0.0.0
8079
depends_on:
8180
- postgres

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ services:
2727
- 'redis'
2828
build:
2929
context: ./services/backend
30-
command: bash -c "rm -rf tmp/pids/server.pid && bundle exec rails s -b 0.0.0.0 -p 4000"
3130
ports:
3231
- '${DOCKER_HOST_WEB_PORT:-4000}:4000'
3332
volumes:

services/backend/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ RUN apt-get clean -qy \
2020
RUN mkdir /app
2121
WORKDIR /app
2222

23-
COPY package.json yarn.lock
24-
RUN yarn install
25-
2623
# install specific version of bundler
2724
RUN gem install bundler -v 2.2.32
2825

@@ -36,10 +33,9 @@ ENV PATH="${BUNDLE_BIN}:${PATH}"
3633
COPY . .
3734

3835
RUN bundle install
39-
RUN bundler install
4036
RUN yarn install
4137
RUN yarn build
4238

4339
EXPOSE 4000
4440

45-
CMD ["/bin/bash", "-c", "bundle exec rails s -b 0.0.0.0 -p 4000"]
41+
CMD ["/bin/bash", "-c", "rm -rf tmp/pids/server.pid && (bundle check || bundle install) && bundle exec rails s -b 0.0.0.0 -p 4000"]

0 commit comments

Comments
 (0)