Skip to content

Commit 9bad3dd

Browse files
committed
Generate prod build inside container
1 parent 1b4a0be commit 9bad3dd

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/pull_requests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,11 @@ jobs:
4444
with:
4545
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4646
containerfiles: ./Containerfile
47-
platforms: linux/arm64, linux/amd64
47+
platforms: linux/amd64
4848
oci: true
4949

5050
- name: UI Tests
5151
if: success()
5252
run: |
5353
sudo apt-get install xvfb
5454
xvfb-run --server-args="-screen 0 1200x800x24" npx grunt testui
55-
image:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- uses: actions/checkout@v3

.github/workflows/releases.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ jobs:
7272
containerfiles: ./Containerfile
7373
platforms: linux/arm64, linux/amd64
7474
oci: true
75+
# Webpack seems to use a lot of open files, increase the max open file limit to accomodate.
76+
extra-args: |
77+
--ulimit nofile=10000
78+
7579
7680
- name: Upload Release Assets
7781
if: success()

Containerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
FROM node:18-alpine AS build
2+
3+
COPY . .
4+
RUN npm ci
5+
RUN npm run build
6+
17
FROM ghcr.io/static-web-server/static-web-server:2.25-alpine
28

3-
COPY ./build/prod /public
9+
COPY --from=build ./build/prod /public

0 commit comments

Comments
 (0)