feat: refs #6695 prepare to push image
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2024-09-30 14:30:08 +02:00
parent 7ddcb1b83f
commit 998b8c83a7
7 changed files with 9 additions and 108 deletions

View File

@ -1,3 +1,4 @@
print/node_modules
front
e2e
storage

6
Jenkinsfile vendored
View File

@ -200,12 +200,6 @@ pipeline {
}
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
sh 'docker-compose push'
script {
if (env.BRANCH_NAME == 'master') {
sh 'docker tag $IMAGE:$TAG $IMAGE:latest'
sh 'docker push $IMAGE:latest'
}
}
}
}
stage('Deploy') {

View File

@ -47,14 +47,20 @@ COPY loopback/package.json loopback/
RUN pnpm install --prod
COPY loopback loopback
RUN rm loopback/server/datasources.json && mv loopback/server/datasources.docker.json loopback/server/datasources.json
COPY back back
COPY db db
COPY .git .git
COPY modules modules
COPY print print
COPY \
LICENSE \
README.md \
myt.config.yml \
./
CMD ["pm2-runtime", "./back/process.yml"]
HEALTHCHECK --interval=15s --timeout=10s \

View File

@ -1,75 +0,0 @@
FROM debian:bookworm-slim
ENV TZ Europe/Madrid
ARG DEBIAN_FRONTEND=noninteractive
# NodeJs
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg2 \
graphicsmagick \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& corepack enable pnpm
# Puppeteer
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libfontconfig lftp xvfb gconf-service libasound2 libatk1.0-0 libc6 \
libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 \
libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
# Extra dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
samba-common-bin samba-dsdb-modules\
&& rm -rf /var/lib/apt/lists/* \
&& npm -g install pm2
# Salix
WORKDIR /salix
RUN npm i -g gulp-cli
COPY print/package.json print/pnpm-lock.yaml print/
RUN pnpm install --prod --prefix=print
COPY package.json pnpm-lock.yaml ./
COPY loopback/package.json loopback/
COPY loopback loopback
COPY back back
COPY modules modules
COPY print print
COPY \
LICENSE \
README.md \
gulpfile.js \
myt.config.yml \
./
RUN npm install -g gulp-cli
RUN apt-get update && apt-get install -y libkrb5-dev libssl-dev
RUN apt-get update \
&& apt-get install -y build-essential python3 libssl-dev
RUN pnpm install
RUN pnpm install husky
COPY db db
COPY front front
COPY storage storage
RUN gulp install
CMD ["pnpx", "gulp", "back"]

View File

@ -1,25 +0,0 @@
services:
front:
image: registry.verdnatura.es/salix-front:${VERSION:?}
build:
context: front
back:
image: registry.verdnatura.es/salix-back:${VERSION:?}
build:
context: .
dockerfile: back/Dockerfile
depends_on:
- db
ports:
- 3000:3000
volumes:
- ./storage:/salix/storage
db:
image: db
command: npx myt run -t -d --ci -n salix_default
build:
context: .
dockerfile: db/Dockerfile
target: db
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@ -8,4 +8,4 @@ services:
image: registry.verdnatura.es/salix-back:${VERSION:?}
build:
context: .
dockerfile: back/Dockerfile.test
dockerfile: back/Dockerfile

View File

@ -7,7 +7,7 @@
"connector": "vn-mysql",
"database": "vn",
"debug": false,
"host": "vn-database",
"host": "localhost",
"port": "3306",
"username": "root",
"password": "root",