feat: docker pull back image #740
|
@ -0,0 +1,44 @@
|
||||||
|
FROM node:lts-bookworm
|
||||||
|
ENV SHELL bash
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
RUN npm install -g pnpm@8.15.1
|
||||||
|
RUN pnpm setup
|
||||||
|
|
||||||
|
RUN pnpm install -g @quasar/cli@2.2.1
|
||||||
|
|
||||||
|
RUN apt-get -y --fix-missing update
|
||||||
|
RUN apt-get -y --fix-missing upgrade
|
||||||
|
RUN apt-get -y --no-install-recommends install apt-utils
|
||||||
|
RUN apt-get install --fix-missing -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
package.json \
|
||||||
|
.npmrc \
|
||||||
|
pnpm-lock.yaml \
|
||||||
|
./
|
||||||
|
|
||||||
|
RUN pnpm install
|
||||||
|
RUN pnpm install cypress
|
||||||
|
RUN npx cypress install
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
quasar.config.js \
|
||||||
|
index.html \
|
||||||
|
jsconfig.json \
|
||||||
|
quasar.extensions.json \
|
||||||
|
.eslintignore \
|
||||||
|
.eslintrc.cjs \
|
||||||
|
postcss.config.js \
|
||||||
|
cypress.config.js \
|
||||||
|
./
|
||||||
|
|
||||||
|
COPY src src
|
||||||
|
COPY test/cypress test/cypress
|
||||||
|
COPY public public
|
||||||
|
|
||||||
|
# RUN npx quasar build
|
||||||
|
|
||||||
|
CMD ["npx", "quasar", "dev"]
|
|
@ -2,7 +2,7 @@ const { defineConfig } = require('cypress');
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: 'http://main:4000/',
|
baseUrl: 'http://front:9000/',
|
||||||
experimentalStudio: true,
|
experimentalStudio: true,
|
||||||
fixturesFolder: 'test/cypress/fixtures',
|
fixturesFolder: 'test/cypress/fixtures',
|
||||||
screenshotsFolder: 'test/cypress/screenshots',
|
screenshotsFolder: 'test/cypress/screenshots',
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
services:
|
||||||
|
front:
|
||||||
|
image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile.e2e
|
||||||
|
ports:
|
||||||
|
- 9000:9000
|
||||||
|
back:
|
||||||
|
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: back/Dockerfile
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
- 5000:5000
|
||||||
|
volumes:
|
||||||
|
- ./test/cypress/storage:/salix/storage
|
||||||
|
db:
|
||||||
|
image: db
|
||||||
|
command: npx myt run -t --ci -n salix-front_default
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: test/cypress/db/Dockerfile
|
||||||
|
target: db
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
e2e:
|
||||||
|
image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
||||||
|
command: npx cypress run
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile.e2e
|
||||||
|
# e2e-2:
|
||||||
|
# image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
||||||
|
# command: npx cypress run --config-file test/cypress/configs/cypress.config.2.js
|
||||||
|
# build:
|
||||||
|
# context: .
|
||||||
|
# dockerfile: ./Dockerfile.e2e
|
|
@ -1,31 +1,7 @@
|
||||||
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
main:
|
main:
|
||||||
image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile
|
||||||
ports:
|
|
||||||
- 4000:4000
|
|
||||||
environment:
|
|
||||||
- VUE_APP_API_URL=http://back:3000
|
|
||||||
back:
|
|
||||||
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: back/Dockerfile
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
- 5000:5000
|
|
||||||
volumes:
|
|
||||||
- ./test/cypress/storage:/salix/storage
|
|
||||||
db:
|
|
||||||
image: db
|
|
||||||
command: npx myt run -t -d --ci -n salix-front_default
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: test/cypress/db/Dockerfile
|
|
||||||
target: db
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
videos/*
|
videos/*
|
||||||
screenshots/*
|
screenshots/*
|
||||||
|
storage/*
|
||||||
|
|
|
@ -24,11 +24,13 @@ WORKDIR /salix
|
||||||
# COPY .git .git
|
# COPY .git .git
|
||||||
# COPY myt.config.yml .
|
# COPY myt.config.yml .
|
||||||
|
|
||||||
# RUN pnpm i @verdnatura/myt
|
|
||||||
COPY --from=back salix/db db
|
COPY --from=back salix/db db
|
||||||
COPY --from=back salix/myt.config.yml .
|
COPY --from=back salix/myt.config.yml .
|
||||||
COPY --from=back salix/.git .git
|
COPY --from=back salix/.git .git
|
||||||
|
|
||||||
COPY node_modules node_modules
|
COPY node_modules node_modules
|
||||||
|
# RUN pnpm i @verdnatura/myt USAR NODE_MODULES HASTA QUE ESTE LA RAMA DE MYT FUSIONADA (MIENTRAS INSTALAR EN LILIUM, MYT Y MODIFICAR EL CODIGO DE myt-run.js)
|
||||||
|
|
||||||
|
|
||||||
FROM base AS db
|
FROM base AS db
|
||||||
|
|
||||||
|
|
|
@ -22,14 +22,12 @@ describe('ClaimPhoto', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open first image dialog change to second and close', () => {
|
it('should open first image dialog change to second and close', () => {
|
||||||
cy.get(
|
cy.get(':nth-last-child(1) > .q-card').click();
|
||||||
':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image'
|
|
||||||
).click();
|
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
||||||
'be.visible'
|
'be.visible'
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('.q-carousel__control > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('.q-carousel__control > button').click();
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon'
|
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon'
|
||||||
|
@ -41,7 +39,7 @@ describe('ClaimPhoto', () => {
|
||||||
|
|
||||||
it('should remove third and fourth file', () => {
|
it('should remove third and fourth file', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||||
|
@ -49,7 +47,7 @@ describe('ClaimPhoto', () => {
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe('Recover Password', () => {
|
||||||
it('should change password to user', () => {
|
it('should change password to user', () => {
|
||||||
// Get token from mail
|
// Get token from mail
|
||||||
cy.request(
|
cy.request(
|
||||||
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
`/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
const regex = /access_token=([a-zA-Z0-9]+)/;
|
const regex = /access_token=([a-zA-Z0-9]+)/;
|
||||||
const [match] = response.body[0].body.match(regex);
|
const [match] = response.body[0].body.match(regex);
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('Two Factor', () => {
|
||||||
it('should enable two factor to sysadmin', () => {
|
it('should enable two factor to sysadmin', () => {
|
||||||
cy.request(
|
cy.request(
|
||||||
'PATCH',
|
'PATCH',
|
||||||
`http://localhost:3000/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`,
|
`/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`,
|
||||||
{ twoFactor: 'email' }
|
{ twoFactor: 'email' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ describe('Two Factor', () => {
|
||||||
|
|
||||||
// Get code from mail
|
// Get code from mail
|
||||||
cy.request(
|
cy.request(
|
||||||
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
`/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
const tempDiv = document.createElement('div');
|
const tempDiv = document.createElement('div');
|
||||||
tempDiv.innerHTML = response.body[0].body;
|
tempDiv.innerHTML = response.body[0].body;
|
||||||
|
|
|
@ -15,3 +15,6 @@
|
||||||
|
|
||||||
import './commands';
|
import './commands';
|
||||||
|
|
||||||
|
Cypress.Screenshot.defaults({
|
||||||
|
screenshotOnRunFailure: false,
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue