Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
node-version: 22
node-version: 24
- name: Create Docker template
run: node create-docker-template.js
- name: Create zip-file for Docker template
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
node-version: 22
node-version: 24
- name: Install backend dependencies
working-directory: ./backend
run: npm ci
Expand All @@ -33,6 +33,12 @@ jobs:
- name: Check linting in frontend
working-directory: ./frontend
run: npm run lint
- name: Check for hardcoded strings
working-directory: ./frontend
run: npm run lint:translations
- name: Check for missing translations
working-directory: ./frontend
run: npm run test:translations
- name: Run frontend unit tests
working-directory: ./frontend
run: npm test
Expand Down
22 changes: 12 additions & 10 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
FROM node:20-alpine AS build-stage
FROM node:24-alpine AS build-stage
WORKDIR /usr/src/eLection-backend

COPY . .

RUN npm ci

RUN npm run build:schema

RUN npm test

RUN npm run build

RUN npm ci && \
npm run build:schema && \
npm test && \
npm run build

FROM node:20-alpine
COPY --from=build-stage /usr/src/eLection-backend/dist .
COPY ./package.json ./package.json
COPY ./package-lock.json ./package-lock.json

RUN npm ci
RUN npm ci && \
adduser -D appuser && \
chown appuser .

USER appuser

EXPOSE 3000

CMD ["npm", "exec", "cross-env", "NODE_ENV=production", "node", "index.js"]
Loading
Loading