diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4a44dd..16b49ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/build/prod.Dockerfile b/build/prod.Dockerfile index 29d4fa9..5fff3ab 100644 --- a/build/prod.Dockerfile +++ b/build/prod.Dockerfile @@ -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"] \ No newline at end of file +CMD ["bin/rails", "server", "-b", "0.0.0.0"] \ No newline at end of file