ci: webapp Github actions (#81)

This commit is contained in:
Ahmed Bouhuolia
2023-02-08 23:33:03 +02:00
committed by GitHub
parent d0e84fb51a
commit 7781d092ca
2 changed files with 12 additions and 8 deletions

View File

@@ -50,6 +50,7 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
file: ./packages/webapp/Dockerfile
push: true push: true
tags: ghcr.io/bigcapitalhq/client:latest tags: ghcr.io/bigcapitalhq/client:latest
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@@ -4,17 +4,20 @@ USER root
WORKDIR /app WORKDIR /app
COPY ./package.json /app/package.json # Install dependencies
COPY ./package-lock.json /app/package-lock.json COPY package.json ./
COPY lerna.json ./
COPY ./packages/webapp/package.json /app/packages/webapp/package.json
RUN npm install RUN npm install
RUN npm run bootstrap
COPY . . # Build webapp package
COPY ./packages/webapp /app/packages/webapp
RUN npm run build RUN npm run build:webapp
FROM nginx FROM nginx
COPY ./nginx/sites/default.conf /etc/nginx/conf.d/default.conf COPY ./packages/webapp/nginx/sites/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/packages/webapp/build /usr/share/nginx/html
COPY --from=build /app/build /usr/share/nginx/html