File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz
17
17
rm -rf /tmp/node-build-master
18
18
19
19
# Rails app lives here
20
+ # Entry point and commands will be run from this directory
20
21
WORKDIR /app
21
22
22
23
# Set production environment
@@ -62,8 +63,8 @@ RUN yarn res:build
62
63
RUN bin/rails react_on_rails:locale
63
64
RUN bin/rails assets:precompile
64
65
65
- # add entrypoint
66
- COPY .controlplane/entrypoint.sh ./
67
- ENTRYPOINT ["/app /entrypoint.sh" ]
66
+ # add entrypoint and release script to docker image at top level
67
+ COPY .controlplane/entrypoint.sh .controlplane/release_script.sh . /
68
+ ENTRYPOINT [". /entrypoint.sh" ]
68
69
69
70
CMD ["./bin/rails" , "server" ]
Original file line number Diff line number Diff line change @@ -49,3 +49,5 @@ yarn-debug.log*
49
49
spec /
50
50
scripts /
51
51
52
+ # No need for controlplane config in docker file. These are used locally and by CI
53
+ /.controlplane
Original file line number Diff line number Diff line change 58
58
cpln image docker-login
59
59
cpl build-image -a ${{ secrets.APP_NAME_STAGING }} --commit ${{steps.vars.outputs.sha_short}} --org ${{secrets.CPLN_ORG_STAGING}}
60
60
61
+ - name : Run release script
62
+ run : |
63
+ # Run database migrations (or other release tasks) with the latest image,
64
+ # while the app is still running on the previous image.
65
+ # This is analogous to the release phase.
66
+ cpl run:detached './release_script.sh' -a ${{ secrets.APP_NAME_STAGING }} --image latest
67
+
61
68
- name : Deploy to Control Plane
62
69
run : |
63
70
cpl deploy-image -a ${{ secrets.APP_NAME_STAGING }} --org ${{secrets.CPLN_ORG_STAGING}}
You can’t perform that action at this time.
0 commit comments