Skip to content

Commit

Permalink
Generate prod build inside container
Browse files Browse the repository at this point in the history
  • Loading branch information
AshCorr committed Feb 6, 2024
1 parent 9d8ce12 commit cdd2eac
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ jobs:
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
containerfiles: ./Containerfile
platforms: linux/arm64, linux/amd64
platforms: linux/amd64
oci: true

- name: UI Tests
if: success()
run: |
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
4 changes: 4 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ jobs:
containerfiles: ./Containerfile
platforms: linux/arm64, linux/amd64
oci: true
# Webpack seems to use a lot of open files, increase the max open file limit to accomodate.
extra-args: |
--ulimit nofile=10000
- name: Upload Release Assets
if: success()
Expand Down
8 changes: 7 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
FROM node:18-alpine AS build

COPY . .
RUN npm ci
RUN npm run build

FROM ghcr.io/static-web-server/static-web-server:2.25-alpine

COPY ./build/prod /public
COPY --from=build ./build/prod /public

0 comments on commit cdd2eac

Please sign in to comment.