Skip to content

Commit

Permalink
Set correct Dockerfile in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Mar 4, 2024
1 parent 610cc5e commit 299c3cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Build and push Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest .
docker build -f build/prod.Dockerfile -t ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest .
docker push ghcr.io/${{ github.repository_owner }}/pfadiolten-home:latest
env:
DOCKER_BUILDKIT: 1
9 changes: 5 additions & 4 deletions build/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ COPY Gemfile.lock .
COPY package.json .
COPY yarn.lock .

RUN gem install bundler:2.1.4 \
&& bundle install --quiet --jobs 4 \
&& yarn install --silent --pure-lockfile
RUN gem install bundler:2.1.4 \
&& bundle install --quiet --jobs 4 \
&& yarn install --silent --pure-lockfile \
&& chmod +x bin/rails

COPY . /pfadiolten-home

CMD ["rails", "server", "-b", "0.0.0.0"]
CMD ["bin/rails", "server", "-b", "0.0.0.0"]

0 comments on commit 299c3cf

Please sign in to comment.