Skip to content

Commit

Permalink
fix: dockerfile, fly-deploy.yml
Browse files Browse the repository at this point in the history
* install yarn on deploy
  • Loading branch information
sean-garwood committed Dec 2, 2024
1 parent 2763793 commit fc8930d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install --global yarn
- run: yarn install
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ WORKDIR /rails

# Install base packages
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl libjemalloc2 libvips postgresql-client && \
apt-get install --no-install-recommends -y curl libjemalloc2 libvips postgresql-client nodejs npm && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install Yarn
RUN npm install --global yarn

# Set production environment
ENV RAILS_ENV="production" \
BUNDLE_DEPLOYMENT="1" \
Expand Down Expand Up @@ -45,9 +48,6 @@ RUN bundle exec bootsnap precompile app/ lib/
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile




# Final stage for app image
FROM base

Expand Down

0 comments on commit fc8930d

Please sign in to comment.