File tree Expand file tree Collapse file tree 5 files changed +23
-25
lines changed Expand file tree Collapse file tree 5 files changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,17 @@ jobs:
24
24
- name : Setup
25
25
run : echo "ALEPH_SECRET=batman\n" >> aleph.env
26
26
27
- - name : Build development image
28
- run : |
29
- docker build -t ghcr.io/alephdata/aleph-ui:${GITHUB_SHA} ui
30
- docker tag ghcr.io/alephdata/aleph-ui:${GITHUB_SHA} ghcr.io/alephdata/aleph-ui:latest
27
+ - name : Set up Docker Buildx
28
+ uses : docker/setup-buildx-action@v3
29
+
30
+ - name : Build Docker image
31
+ uses : docker/build-push-action@v6
32
+ with :
33
+ context : ./ui
34
+ push : false
35
+ tags : ghcr.io/alephdata/aleph-ui-production:${{ github.sha }}
36
+ cache-from : type=gha
37
+ cache-to : type=gha,mode=max
31
38
32
39
- name : Check code formatting
33
40
run : make format-check-ui
38
45
- name : Run tests
39
46
run : make test-ui
40
47
41
- - name : Build
42
- run : make build-ui
43
-
44
- - name : Build production image
45
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
46
- run : docker build -t ghcr.io/alephdata/aleph-ui-production:${GITHUB_SHA} -f ui/Dockerfile.production ui
47
-
48
48
- name : Push docker image (tagged)
49
49
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
50
50
run : |
Original file line number Diff line number Diff line change 77
77
$(COMPOSE ) build
78
78
79
79
build-ui :
80
- docker build -t ghcr.io/alephdata/aleph-ui-production:$(ALEPH_TAG ) -f ui/Dockerfile.production ui
80
+ docker build -t ghcr.io/alephdata/aleph-ui-production:$(ALEPH_TAG ) -f ui/Dockerfile ui
81
81
82
82
build-e2e :
83
83
$(COMPOSE_E2E ) build --build-arg PLAYWRIGHT_VERSION=$(shell awk -F'==' '/^playwright==/ { print $$2 }' e2e/requirements.txt)
Original file line number Diff line number Diff line change @@ -138,18 +138,17 @@ services:
138
138
- aleph.env
139
139
140
140
ui :
141
+ image : ghcr.io/alephdata/aleph-ui-production:${ALEPH_TAG:-latest}
141
142
build :
142
143
context : ui
143
- image : ghcr.io/alephdata/aleph-ui:${ALEPH_TAG:-latest}
144
+ target : builder
144
145
depends_on :
145
146
- api
146
- command : " npm run start"
147
+ command : " bash -c ' npm install && npm start' "
147
148
ports :
148
149
- " 8080:8080"
149
150
volumes :
150
151
- " ./ui:/alephui"
151
- env_file :
152
- - aleph.env
153
152
154
153
worker :
155
154
build :
Original file line number Diff line number Diff line change 1
- FROM node:23-slim
2
- ENV DEBIAN_FRONTEND noninteractive
1
+ FROM node:23-slim AS builder
3
2
4
3
RUN mkdir /alephui
5
4
WORKDIR /alephui
@@ -8,4 +7,10 @@ COPY package.json /alephui
8
7
COPY package-lock.json /alephui
9
8
10
9
RUN npm ci
11
- COPY . .
10
+ COPY . .
11
+ RUN npm run build
12
+
13
+ FROM nginx:alpine
14
+
15
+ COPY nginx.conf /etc/nginx/nginx.conf
16
+ COPY --from=builder /alephui/build /assets
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments