Skip to content

Commit

Permalink
ci: work around open file limitations for docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikonse committed Jan 2, 2024
1 parent ba8f44f commit b0833d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -e '.[dev,test]'
run: pip install '.[dev,test]'
- name: Analysing the code with pylint
run: make pylint

Expand All @@ -25,7 +25,7 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -e '.[dev,test]'
run: pip install '.[dev,test]'
- name: Analysing the code with mypy
run: make mypy

Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e '.[dev,test]'
run: pip install '.[dev,test]'
- name: Run all tests
run: pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html

Expand All @@ -76,6 +76,6 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -e '.[dev,test]'
run: pip install '.[dev,test]'
- name: Check formatting
run: make check-format
12 changes: 12 additions & 0 deletions .github/workflows/push_on_master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
- get-distros
steps:
- uses: actions/checkout@master
- name: Set up Nodejs
uses: actions/setup-node@v2
with:
node-version: "18"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci

- name: Build API Image
id: build-api-image
Expand All @@ -68,6 +76,10 @@ jobs:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}

- name: Build Frontend
working-directory: frontend
run: npx build web

- name: Build Frontend Image
id: build-frontend-image
uses: redhat-actions/buildah-build@v2
Expand Down
6 changes: 1 addition & 5 deletions docker/Dockerfile-frontend
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# syntax=docker/dockerfile:1.3
FROM node:lts as build
ADD frontend/ /build/
RUN cd /build/ && npm install && npx nx build web

FROM docker.io/nginx:stable-alpine
COPY --from=build --chown=nginx:nginx /build/dist/apps/web/ /var/www/abrechnung/
COPY --chown=nginx:nginx frontend/dist/apps/web/ /var/www/abrechnung/
COPY --chown=nginx:nginx frontend/apps/web/src/assets/config.json /var/www/abrechnung/config.json
COPY docker/nginx-static /etc/nginx/conf.d/default.conf

0 comments on commit b0833d1

Please sign in to comment.