Skip to content

Commit

Permalink
fix: update docker files (node:20.11.1-alpine)
Browse files Browse the repository at this point in the history
  • Loading branch information
raronpxcsw committed Sep 11, 2024
1 parent 32ca4b5 commit 939a54d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

**/bin
**/obj
./aas-server/users
./aas-server/test/users
nginx
*.user
*.log
Expand All @@ -45,7 +43,7 @@ temp
swagger.json
swagger.yaml
projects/aas-server/src/app/routes
projects/ass-server/src/assets/app-info.json
./projects/ass-server/src/assets/app-info.json

# System files
.DS_Store
Expand Down
9 changes: 6 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
variables:
NODE_IMAGE: node:20.11.1-alpine

stages:
- tag
- build
- test
- deploy

tag:
image: node:alpine3.19
image: $NODE_IMAGE
stage: tag
rules:
- if: '$CI_COMMIT_MESSAGE !~ /(Release)/'
Expand All @@ -15,7 +18,7 @@ tag:
- npx semantic-release

build:
image: node:alpine3.19
image: $NODE_IMAGE
stage: build
rules:
- if: '$CI_COMMIT_MESSAGE =~ /(Release)/'
Expand All @@ -24,7 +27,7 @@ build:
- npm run build -ws

test:
image: node:alpine3.19
image: $NODE_IMAGE
stage: test
rules:
- if: '$CI_COMMIT_MESSAGE =~ /(Release)/'
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Dockerfile to build server and client parts
FROM node:alpine3.19 AS build
FROM node:20.11.1-alpine AS build
WORKDIR /usr/src/app
COPY . .
# RUN apk add g++ make py3-pip
RUN npm install
RUN node --no-warnings --loader ts-node/esm create-app-info.ts
RUN npm run build

FROM node:alpine3.19 AS aasportal
FROM node:20.11.1-alpine AS aasportal
RUN apk upgrade --update-cache --available && apk add openssl && rm -rf /var/cache/apk/*
WORKDIR /usr/src/app
COPY projects/aas-server/package.json package.json
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aas-portal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile to build server and client parts
FROM node:alpine3.19 AS build
FROM node:20.11.1-alpine AS build
WORKDIR /usr/src/app
COPY . .
RUN npm install
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.aas-server
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Dockerfile to build server and client parts
FROM node:alpine3.19 as build
FROM node:20.11.1-alpine as build
WORKDIR /usr/src/app
COPY . .
# RUN apk add g++ make py3-pip
RUN npm install
RUN node --no-warnings --loader ts-node/esm create-app-info.ts
RUN npm run aas-server:build

FROM node:alpine3.19 AS aas-server
FROM node:20.11.1-alpine AS aas-server
RUN apk upgrade --update-cache --available && apk add openssl && rm -rf /var/cache/apk/*
WORKDIR /usr/src/app
COPY projects/aas-server/package.json package.json
Expand Down

0 comments on commit 939a54d

Please sign in to comment.