mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 00:18:19 +01:00
chore: Update Docker build push action version + try to fix build
This commit is contained in:
parent
de1e79ee6d
commit
241be497bd
|
|
@ -14,4 +14,6 @@ helm-charts
|
|||
.idea
|
||||
coverage*
|
||||
uploads
|
||||
logs
|
||||
logs
|
||||
dist
|
||||
pages/dist
|
||||
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
|
|
@ -71,7 +71,7 @@ jobs:
|
|||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
|
|
|||
16
Dockerfile
16
Dockerfile
|
|
@ -12,23 +12,25 @@ COPY --from=node:18-alpine /usr/local/bin/node /usr/local/bin/node
|
|||
FROM base AS install
|
||||
|
||||
# install with --production (exclude devDependencies)
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY . /temp/prod/
|
||||
RUN cd /temp/prod && bun install --frozen-lockfile --production.
|
||||
RUN mkdir -p /temp
|
||||
COPY . /temp
|
||||
WORKDIR /temp
|
||||
RUN bun install --frozen-lockfile --production.
|
||||
|
||||
# Build Vite in pages
|
||||
RUN cd /temp/prod && bunx --bun vite build pages
|
||||
RUN bunx --bun vite build pages
|
||||
|
||||
# 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
|
||||
FROM base AS release
|
||||
|
||||
# Create app directory
|
||||
RUN mkdir -p /app
|
||||
COPY --from=install /temp/prod/dist /app/dist
|
||||
COPY --from=install /temp/prod/pages /app/pages
|
||||
COPY --from=install /temp/dist /app/dist
|
||||
COPY --from=install /temp/pages /app/pages
|
||||
COPY entrypoint.sh /app
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue