mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
parent
92ad202bfe
commit
5959d056f3
@ -32,24 +32,27 @@ RUN ./build
|
|||||||
#
|
#
|
||||||
# STAGE 2: CLIENT
|
# STAGE 2: CLIENT
|
||||||
#
|
#
|
||||||
FROM node:18-bullseye-slim as client
|
|
||||||
|
|
||||||
# install dependencies
|
|
||||||
RUN set -eux; apt-get update; \
|
|
||||||
apt-get install -y --no-install-recommends python2 build-essential
|
|
||||||
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# install dependencies
|
# Because client builds fail in Github Actions, therefor we build it outside of Docker.
|
||||||
COPY client/package*.json ./
|
#
|
||||||
RUN npm install
|
# FROM node:18-bullseye-slim as client
|
||||||
|
#
|
||||||
|
# # install dependencies
|
||||||
|
# RUN set -eux; apt-get update; \
|
||||||
|
# apt-get install -y --no-install-recommends python2 build-essential
|
||||||
|
#
|
||||||
|
# WORKDIR /src
|
||||||
|
#
|
||||||
|
# #
|
||||||
|
# # install dependencies
|
||||||
|
# COPY client/package*.json ./
|
||||||
|
# RUN npm install
|
||||||
|
#
|
||||||
|
# #
|
||||||
|
# # build client
|
||||||
|
# COPY client/ .
|
||||||
|
# RUN npm run build
|
||||||
#
|
#
|
||||||
# build client
|
|
||||||
COPY client/ .
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# STAGE 3: RUNTIME
|
# STAGE 3: RUNTIME
|
||||||
#
|
#
|
||||||
@ -134,7 +137,8 @@ ENV NEKO_BIND=:8080
|
|||||||
#
|
#
|
||||||
# copy static files from previous stages
|
# copy static files from previous stages
|
||||||
COPY --from=server /src/bin/neko /usr/bin/neko
|
COPY --from=server /src/bin/neko /usr/bin/neko
|
||||||
COPY --from=client /src/dist/ /var/www
|
# COPY --from=client /src/dist/ /var/www
|
||||||
|
COPY client/dist/ /var/www
|
||||||
|
|
||||||
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
|
HEALTHCHECK --interval=10s --timeout=5s --retries=8 \
|
||||||
CMD wget -O - http://localhost:${NEKO_BIND#*:}/health || exit 1
|
CMD wget -O - http://localhost:${NEKO_BIND#*:}/health || exit 1
|
||||||
|
37
.github/workflows/ghcr-arm.yml
vendored
37
.github/workflows/ghcr-arm.yml
vendored
@ -13,7 +13,7 @@ env:
|
|||||||
PLATFORMS: linux/arm64,linux/arm/v7
|
PLATFORMS: linux/arm64,linux/arm/v7
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-base:
|
build-client:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
#
|
#
|
||||||
# do not run on forks
|
# do not run on forks
|
||||||
@ -23,6 +23,41 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Set up node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
-
|
||||||
|
name: Build client
|
||||||
|
run: |
|
||||||
|
cd client
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
-
|
||||||
|
name: Upload client dist
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: client-dist
|
||||||
|
path: client/dist
|
||||||
|
|
||||||
|
build-base:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
#
|
||||||
|
# do not run on forks
|
||||||
|
#
|
||||||
|
if: github.repository_owner == 'm1k1o'
|
||||||
|
needs: [ build-client ]
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Download client dist
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: client-dist
|
||||||
|
path: client/dist
|
||||||
-
|
-
|
||||||
name: Set up QEMU
|
name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
Loading…
Reference in New Issue
Block a user