Skip to content

Commit 5822ac5

Browse files
committed
feat(web): Added a one-page frontend to the dockerfile
1 parent c7e567c commit 5822ac5

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/docker.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
chart: ${{ steps.filter.outputs.chart }}
2323
parser: ${{ steps.filter.outputs.parser }}
2424
docs: ${{ steps.filter.outputs.docs }}
25+
web: ${{ steps.filter.outputs.web }}
2526
steps:
2627
- uses: actions/checkout@v4
2728
- uses: dorny/paths-filter@v3
@@ -38,6 +39,8 @@ jobs:
3839
- 'shared/**'
3940
docs:
4041
- 'docs/**'
42+
web:
43+
- 'web/**'
4144
4245
build-server:
4346
name: Build server
@@ -188,3 +191,41 @@ jobs:
188191
platforms: linux/amd64,linux/arm64
189192
cache-from: type=gha
190193
cache-to: type=gha,mode=max
194+
195+
196+
build-web:
197+
name: Build web
198+
needs: detect-changes
199+
if: needs.detect-changes.outputs.web == 'true'
200+
runs-on: ubuntu-latest
201+
steps:
202+
- uses: actions/checkout@v4
203+
204+
- uses: docker/setup-qemu-action@v3
205+
- uses: docker/setup-buildx-action@v3
206+
207+
- uses: docker/login-action@v3
208+
with:
209+
registry: ${{ env.REGISTRY }}
210+
username: ${{ github.actor }}
211+
password: ${{ secrets.GITHUB_TOKEN }}
212+
213+
- id: meta
214+
uses: docker/metadata-action@v5
215+
with:
216+
images: ${{ env.IMAGE_PREFIX }}-web
217+
tags: |
218+
type=raw,value=latest
219+
type=ref,event=branch
220+
type=sha
221+
222+
- uses: docker/build-push-action@v5
223+
with:
224+
file: ./web/Dockerfile
225+
context: ./web
226+
push: true
227+
tags: ${{ steps.meta.outputs.tags }}
228+
labels: ${{ steps.meta.outputs.labels }}
229+
platforms: linux/amd64,linux/arm64
230+
cache-from: type=gha
231+
cache-to: type=gha,mode=max

docker-compose.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ services:
6060
- ./docs/dist:/docs
6161
command: sh -c 'cp -r /app/dist/* /docs'
6262

63+
web:
64+
build:
65+
context: ./web
66+
dockerfile: Dockerfile
67+
volumes:
68+
- ./web:/web
69+
6370
postgres:
6471
image: postgres:17
6572
restart: unless-stopped

web/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM busybox:1.36.1
2+
3+
WORKDIR /app
4+
5+
COPY . /app
6+
7+
CMD sh -c 'cp -r /app/* /web'

0 commit comments

Comments
 (0)