feat: refs #6695 update Docker configurations and Cypress settings for improved local development
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
aa3c22a250
commit
574ecba4d6
|
@ -3,13 +3,14 @@ import vitePreprocessor from 'cypress-vite';
|
||||||
// https://docs.cypress.io/app/tooling/reporters
|
// https://docs.cypress.io/app/tooling/reporters
|
||||||
// https://docs.cypress.io/app/references/configuration
|
// https://docs.cypress.io/app/references/configuration
|
||||||
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
||||||
// baseUrl: `http://${process.env.NETWORK ? 'front' : 'localhost'}:9000`,
|
const baseUrl = `http://${process.env.DOCKER ? 'front' : 'localhost'}:9000`;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: `http://front:9000`,
|
baseUrl,
|
||||||
experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios
|
experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios
|
||||||
defaultCommandTimeout: 10000,
|
defaultCommandTimeout: 10000,
|
||||||
|
trashAssetsBeforeRuns: false,
|
||||||
requestTimeout: 10000,
|
requestTimeout: 10000,
|
||||||
responseTimeout: 30000,
|
responseTimeout: 30000,
|
||||||
pageLoadTimeout: 60000,
|
pageLoadTimeout: 60000,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
back:
|
back:
|
||||||
image: registry.verdnatura.es/salix-back:25.08.0-build1314
|
image: registry.verdnatura.es/salix-back:dev
|
||||||
# image: back_try
|
# image: back_try
|
||||||
volumes:
|
volumes:
|
||||||
- ./test/cypress/storage:/salix/storage
|
- ./test/cypress/storage:/salix/storage
|
||||||
|
@ -18,6 +18,7 @@ services:
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Madrid
|
- TZ=Europe/Madrid
|
||||||
|
- DOCKER=true
|
||||||
# ports:
|
# ports:
|
||||||
# - '9000:9000'
|
# - '9000:9000'
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@ services:
|
||||||
command: sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium --spec ${CYPRESS_SPEC:?}"
|
command: sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium --spec ${CYPRESS_SPEC:?}"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Madrid
|
- TZ=Europe/Madrid
|
||||||
|
- DOCKER=true
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
|
@ -38,62 +40,6 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app:delegated
|
- .:/app:delegated
|
||||||
vn-database:
|
vn-database:
|
||||||
image: alexmorenovn/vn_db:latest
|
image: registry.verdnatura.es/salix-db:dev
|
||||||
# ports:
|
# ports:
|
||||||
# - '3306:3306'
|
# - '3306:3306'
|
||||||
|
|
||||||
# e2e:
|
|
||||||
# command: npx cypress run --browser chromium
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# volumes:
|
|
||||||
# - .:/app
|
|
||||||
# working_dir: /app
|
|
||||||
|
|
||||||
# front:
|
|
||||||
# # command: pnpx quasar dev
|
|
||||||
# # command: npx quasar serve --history --proxy ./proxy.mjs --hostname 127.0.0.1 --port 9000
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# network_mode: host
|
|
||||||
# e2e:
|
|
||||||
# command: pnpx cypress run --browser chromium
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# network_mode: host
|
|
||||||
# volumes:
|
|
||||||
# - ./node_modules:/app/node_modules
|
|
||||||
# db:
|
|
||||||
# image: db
|
|
||||||
# command: npx myt run -t --ci -d -n front_default
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: test/cypress/db/Dockerfile
|
|
||||||
# network_mode: host
|
|
||||||
# privileged: true
|
|
||||||
# volumes:
|
|
||||||
# - /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
# back:
|
|
||||||
# image: back
|
|
||||||
# build:
|
|
||||||
# context: ./salix
|
|
||||||
# dockerfile: salix/back/Dockerfile
|
|
||||||
# # depends_on:
|
|
||||||
# # - db
|
|
||||||
# ports:
|
|
||||||
# - 3000:3000
|
|
||||||
# - 5000:5000
|
|
||||||
# volumes:
|
|
||||||
# - ./test/cypress/storage:/salix/storage
|
|
||||||
|
|
||||||
# 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,15 +1,12 @@
|
||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
back:
|
back:
|
||||||
image: registry.verdnatura.es/salix-back:25.08.0-build1296
|
image: registry.verdnatura.es/salix-back:dev
|
||||||
# image: back_try
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./test/cypress/storage:/salix/storage
|
- ./test/cypress/storage:/salix/storage
|
||||||
- ./test/cypress/back/datasources.json:/salix/loopback/server/datasources.json
|
- ./test/cypress/back/datasources.json:/salix/loopback/server/datasources.json
|
||||||
depends_on:
|
depends_on:
|
||||||
- vn-database
|
- vn-database
|
||||||
# ports:
|
|
||||||
# - '3000:3000'
|
|
||||||
front:
|
front:
|
||||||
image: alexmorenovn/vndev:latest
|
image: alexmorenovn/vndev:latest
|
||||||
command: quasar dev
|
command: quasar dev
|
||||||
|
@ -18,73 +15,15 @@ services:
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Madrid
|
- TZ=Europe/Madrid
|
||||||
# ports:
|
- DOCKER=true
|
||||||
# - '9000:9000'
|
|
||||||
e2e:
|
e2e:
|
||||||
image: cypress-setup:latest
|
image: cypress-setup:latest
|
||||||
command: sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium"
|
command: sh -c "while [ ! -d node_modules/cypress ]; do sleep 1; done && pnpm exec cypress run --browser chromium"
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Madrid
|
- TZ=Europe/Madrid
|
||||||
|
- DOCKER=true
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
vn-database:
|
vn-database:
|
||||||
image: alexmorenovn/vn_db:latest
|
image: registry.verdnatura.es/salix-db:dev
|
||||||
# ports:
|
|
||||||
# - '3306:3306'
|
|
||||||
|
|
||||||
# e2e:
|
|
||||||
# command: npx cypress run --browser chromium
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# volumes:
|
|
||||||
# - .:/app
|
|
||||||
# working_dir: /app
|
|
||||||
|
|
||||||
# front:
|
|
||||||
# # command: pnpx quasar dev
|
|
||||||
# # command: npx quasar serve --history --proxy ./proxy.mjs --hostname 127.0.0.1 --port 9000
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# network_mode: host
|
|
||||||
# e2e:
|
|
||||||
# command: pnpx cypress run --browser chromium
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: ./Dockerfile.e2e
|
|
||||||
# network_mode: host
|
|
||||||
# volumes:
|
|
||||||
# - ./node_modules:/app/node_modules
|
|
||||||
# db:
|
|
||||||
# image: db
|
|
||||||
# command: npx myt run -t --ci -d -n front_default
|
|
||||||
# build:
|
|
||||||
# context: .
|
|
||||||
# dockerfile: test/cypress/db/Dockerfile
|
|
||||||
# network_mode: host
|
|
||||||
# privileged: true
|
|
||||||
# volumes:
|
|
||||||
# - /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
# back:
|
|
||||||
# image: back
|
|
||||||
# build:
|
|
||||||
# context: ./salix
|
|
||||||
# dockerfile: salix/back/Dockerfile
|
|
||||||
# # depends_on:
|
|
||||||
# # - db
|
|
||||||
# ports:
|
|
||||||
# - 3000:3000
|
|
||||||
# - 5000:5000
|
|
||||||
# volumes:
|
|
||||||
# - ./test/cypress/storage:/salix/storage
|
|
||||||
|
|
||||||
# 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
|
|
||||||
#
|
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
import { configure } from 'quasar/wrappers';
|
import { configure } from 'quasar/wrappers';
|
||||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
// const target = `http://${process.env.NETWORK ? 'back' : 'localhost'}:3000`;
|
const target = `http://${process.env.DOCKER ? 'back' : 'localhost'}:3000`;
|
||||||
const target = `http://back:3000`;
|
|
||||||
|
|
||||||
export default configure(function (/* ctx */) {
|
export default configure(function (/* ctx */) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM mariadb:10.11.6
|
FROM mariadb:10.11.6
|
||||||
ENV TZ Europe/Madrid
|
ENV TZ Europe/Madrid
|
||||||
COPY --from=mariadb-with-data /data /var/lib/mysql
|
COPY --from=vn-database /data /var/lib/mysql
|
||||||
CMD ["mysqld"]
|
CMD ["mysqld"]
|
||||||
|
|
Loading…
Reference in New Issue