feat: refs #6695 run db in docker
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Alex Moreno 2024-09-30 09:00:59 +02:00
parent 7c17a1cf09
commit 7ddcb1b83f
3 changed files with 35 additions and 35 deletions

View File

@ -1,32 +1,29 @@
FROM node:20-bullseye AS base
# FROM back AS base
FROM docker:dind 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 apk update \
&& apk add --update nodejs npm python3 \
krb5-dev libressl-dev
RUN apk update \
&& apk add --virtual build-dependencies \
build-base gcc wget git
RUN npm i -g pnpm
WORKDIR /salix
COPY db db
# COPY node_modules node_modules
COPY node_modules node_modules
COPY .git .git
COPY myt.config.yml .
# RUN ls
RUN pnpm i @verdnatura/myt
# 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"]

View File

@ -1,4 +1,3 @@
version: '3.7'
services:
front:
image: registry.verdnatura.es/salix-front:${VERSION:?}
@ -9,14 +8,18 @@ services:
build:
context: .
dockerfile: back/Dockerfile
# volumes:
# - ./storage:/salix/storage
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
# user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@ -7,7 +7,7 @@
"connector": "vn-mysql",
"database": "vn",
"debug": false,
"host": "localhost",
"host": "vn-database",
"port": "3306",
"username": "root",
"password": "root",
@ -121,19 +121,19 @@
"video/mp4"
]
},
"supplierStorage": {
"name": "supplierStorage",
"connector": "loopback-component-storage",
"provider": "filesystem",
"root": "./storage/dms",
"maxFileSize": "31457280",
"allowedContentTypes": [
"image/png",
"image/jpeg",
"image/jpg",
"image/webp",
"video/mp4",
"application/pdf"
"supplierStorage": {
"name": "supplierStorage",
"connector": "loopback-component-storage",
"provider": "filesystem",
"root": "./storage/dms",
"maxFileSize": "31457280",
"allowedContentTypes": [
"image/png",
"image/jpeg",
"image/jpg",
"image/webp",
"video/mp4",
"application/pdf"
]
},
"accessStorage": {