feat: refs #6695 try up db
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
621e39afbe
commit
1b47612c5e
|
@ -1,3 +1,3 @@
|
|||
node_modules
|
||||
print/node_modules
|
||||
front
|
||||
e2e
|
||||
|
|
|
@ -186,27 +186,27 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Push') {
|
||||
when {
|
||||
expression { RUN_BUILD }
|
||||
}
|
||||
environment {
|
||||
CREDENTIALS = credentials('docker-registry')
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def packageJson = readJSON file: 'package.json'
|
||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
}
|
||||
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('Push') {
|
||||
// when {
|
||||
// expression { RUN_BUILD }
|
||||
// }
|
||||
// environment {
|
||||
// CREDENTIALS = credentials('docker-registry')
|
||||
// }
|
||||
// steps {
|
||||
// script {
|
||||
// def packageJson = readJSON file: 'package.json'
|
||||
// env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||
// }
|
||||
// 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') {
|
||||
when {
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
FROM node:20-bullseye AS base
|
||||
# FROM back AS base
|
||||
|
||||
ENV TZ Europe/Madrid
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libkrb5-dev libssl-dev
|
||||
|
||||
RUN npm i -g pnpm
|
||||
|
||||
WORKDIR /salix
|
||||
|
||||
COPY db db
|
||||
# COPY node_modules node_modules
|
||||
COPY myt.config.yml .
|
||||
# RUN ls
|
||||
|
||||
RUN pnpm i @verdnatura/myt
|
||||
|
||||
|
||||
FROM base AS db
|
||||
|
||||
WORKDIR /salix
|
||||
# RUN cat myt.config.yml
|
||||
# RUN ls
|
||||
# RUN cd db
|
||||
# RUN ls
|
||||
RUN usermod -aG docker $USER
|
||||
# RUN npx myt run -d
|
||||
CMD ["npx", "myt", "run", "-d"]
|
|
@ -0,0 +1,22 @@
|
|||
version: '3.7'
|
||||
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
|
||||
volumes:
|
||||
- ./storage:/salix/storage
|
||||
db:
|
||||
image: db
|
||||
build:
|
||||
context: .
|
||||
dockerfile: db/Dockerfile
|
||||
target: db
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
user: root
|
Loading…
Reference in New Issue