mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 01:36:22 +00:00
refactor: move node and builder images
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node:v18
|
||||
|
||||
WORKDIR /minimal-connector
|
||||
ENTRYPOINT ["node", "lib/cli.js", "run", "--"]
|
||||
CMD [""]
|
||||
|
||||
# Add connector as last step to reuse layers effectively
|
||||
ADD . /minimal-connector
|
||||
ADD . /minimal-connector
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
"deploy": "pnpm --prod --filter=@openstapps/minimal-connector deploy ../../.deploy/minimal-connector",
|
||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
|
||||
@@ -1 +1 @@
|
||||
nodes/
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
database:
|
||||
image: registry.gitlab.com/openstapps/database:master
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:2.0.0
|
||||
volumes:
|
||||
- ./database:/usr/share/elasticsearch/data
|
||||
expose:
|
||||
@@ -9,12 +9,12 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
image: registry.gitlab.com/openstapps/backend/default:core-0.31
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.0
|
||||
environment:
|
||||
ES_ADDR: "http://database:9200"
|
||||
NODE_CONFIG_ENV: "elasticsearch"
|
||||
ALLOW_NO_TRANSPORT: "true"
|
||||
expose:
|
||||
expose:
|
||||
- 3000
|
||||
ports:
|
||||
- 3000:3000
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
- database
|
||||
|
||||
api:
|
||||
image: registry.gitlab.com/openstapps/api/copy:core-0.23
|
||||
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.0
|
||||
links:
|
||||
- "backend"
|
||||
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/node
|
||||
|
||||
stages:
|
||||
- build
|
||||
- audit
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- npm ci
|
||||
|
||||
npm build:
|
||||
stage: build
|
||||
script:
|
||||
- npm run build
|
||||
artifacts:
|
||||
paths:
|
||||
- lib
|
||||
|
||||
audit:
|
||||
allow_failure: true
|
||||
except:
|
||||
- schedules
|
||||
script:
|
||||
- npm audit
|
||||
stage: audit
|
||||
|
||||
scheduled-audit:
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- npm audit --audit-level=high
|
||||
stage: audit
|
||||
|
||||
docker image:
|
||||
image: registry.gitlab.com/openstapps/projectmanagement/builder:latest
|
||||
dependencies:
|
||||
- npm build
|
||||
stage: publish
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- export CORE_VERSION=$(openstapps-projectmanagement get-used-version @openstapps/core)
|
||||
- export VERSION=$(echo -n "$CI_BUILD_REF_NAME" | cut -c 2-)
|
||||
- export IMAGETAG_BASE=$CI_REGISTRY_IMAGE
|
||||
- export IMAGETAG_CORE_VERSION=$IMAGETAG_BASE:core-$CORE_VERSION
|
||||
- export IMAGETAG_VERSION=$IMAGETAG_BASE:$VERSION
|
||||
- export IMAGETAG_LATEST=$IMAGETAG_BASE:latest
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
|
||||
- docker build -t $IMAGETAG_LATEST -t $IMAGETAG_VERSION -t $IMAGETAG_CORE_VERSION .
|
||||
- docker push $IMAGETAG_BASE
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
except:
|
||||
- branches
|
||||
tags:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
||||
script:
|
||||
- npm run documentation
|
||||
- mv docs public
|
||||
stage: deploy
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node
|
||||
FROM registry.gitlab.com/openstapps/projectmanagement/node:v18
|
||||
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["node", "lib/cli.js"]
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup-node --dts",
|
||||
"deploy": "pnpm --prod --filter=@openstapps/minimal-plugin deploy ../../.deploy/minimal-plugin",
|
||||
"format": "prettier . -c --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
|
||||
Reference in New Issue
Block a user