chore: Update Docker build push action version + try to fix build

This commit is contained in:
Jesse Wierzbinski 2023-12-08 15:00:02 -10:00
parent de1e79ee6d
commit 241be497bd
No known key found for this signature in database
3 changed files with 13 additions and 9 deletions

View file

@ -14,4 +14,6 @@ helm-charts
.idea .idea
coverage* coverage*
uploads uploads
logs logs
dist
pages/dist

View file

@ -71,7 +71,7 @@ jobs:
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 uses: docker/build-push-action@v5.1.0
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}

View file

@ -12,23 +12,25 @@ COPY --from=node:18-alpine /usr/local/bin/node /usr/local/bin/node
FROM base AS install FROM base AS install
# install with --production (exclude devDependencies) # install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod RUN mkdir -p /temp
COPY . /temp/prod/ COPY . /temp
RUN cd /temp/prod && bun install --frozen-lockfile --production. WORKDIR /temp
RUN bun install --frozen-lockfile --production.
# Build Vite in pages # Build Vite in pages
RUN cd /temp/prod && bunx --bun vite build pages RUN bunx --bun vite build pages
# Build the project # Build the project
RUN cd /temp/prod && bun run build.ts RUN bun run build.ts
WORKDIR /temp/dist
# copy production dependencies and source code into final image # copy production dependencies and source code into final image
FROM base AS release FROM base AS release
# Create app directory # Create app directory
RUN mkdir -p /app RUN mkdir -p /app
COPY --from=install /temp/prod/dist /app/dist COPY --from=install /temp/dist /app/dist
COPY --from=install /temp/prod/pages /app/pages COPY --from=install /temp/pages /app/pages
COPY entrypoint.sh /app COPY entrypoint.sh /app