File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,24 @@ RUN bundle config set force_ruby_platform true
4242RUN bundle config set system 'true'
4343RUN bundle install
4444
45- # COPY --chown=bfs:bfs . .
45+ # =================================
46+ # Target: production
47+ # =================================
48+ FROM base AS production
49+
50+ # Copy the built codebase from the dev stage
51+ COPY --from=development --chown=bfs /usr/local/bundle /usr/local/bundle
4652
4753# =================================
4854# Target: production
4955# =================================
5056FROM base AS production
5157
5258# Copy the built codebase from the dev stage
53- # COPY --from=development --chown=bfs /opt/app /opt/app
5459COPY --from=development --chown=bfs /usr/local/bundle /usr/local/bundle
5560
61+ USER bfs
62+
5663WORKDIR /opt/app
5764RUN bundle config set frozen 'true'
5865RUN bundle install --local
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ services:
1313 - ./:/opt/app:rw
1414 - ./secrets:/run/secrets:ro
1515 secrets :
16- - source : SSH_KEY
17- target : /opt/app /.ssh/id_rsa
16+ - source : SSH_KEY
17+ target : /home/bfs /.ssh/id_rsa
1818 uid : " 40061"
1919 gid : " 40061"
2020 mode : 0400
You can’t perform that action at this time.
0 commit comments