From c55d4b93ee6ca01ecc4352ba4f80a05a805f2136 Mon Sep 17 00:00:00 2001 From: taro Date: Thu, 6 Feb 2025 13:50:49 -0300 Subject: [PATCH] chore: add docker files for local development for backend and frontend --- .dockerignore | 5 ++++- Dockerfile-front | 12 ++++++++++++ back/Dockerfile | 15 +++++++++++++++ quasar.config.js | 4 ++-- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Dockerfile-front create mode 100644 back/Dockerfile diff --git a/.dockerignore b/.dockerignore index ebf83b0b..aee456a4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,5 @@ debian -node_modules \ No newline at end of file +node_modules +.quasar +build +.vscode diff --git a/Dockerfile-front b/Dockerfile-front new file mode 100644 index 00000000..0f938c42 --- /dev/null +++ b/Dockerfile-front @@ -0,0 +1,12 @@ +FROM node:20-bookworm + +RUN npm install -g pnpm@8 + +WORKDIR /hedera + +COPY package.json pnpm-lock.yaml ./ +RUN pnpm install + +COPY . . + +CMD [ "npm", "run", "front" ] diff --git a/back/Dockerfile b/back/Dockerfile new file mode 100644 index 00000000..270b31b8 --- /dev/null +++ b/back/Dockerfile @@ -0,0 +1,15 @@ +FROM php:8.2-cli + +RUN apt-get update && apt-get install -y --no-install-recommends git + +WORKDIR /usr/src +RUN git clone https://gitea.verdnatura.es/verdnatura/php-vn-lib.git + +RUN docker-php-ext-install mysqli + +WORKDIR /usr/src/hedera-web +COPY . . + +WORKDIR /usr/src/hedera-web/back + +CMD [ "php", "-S", "0.0.0.0:3002", "-t", ".", "index.php" ] diff --git a/quasar.config.js b/quasar.config.js index e7bbb5e0..9abbcd7c 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -101,9 +101,9 @@ module.exports = configure(function (ctx) { headers: { 'Access-Control-Allow-Origin': '*' }, // stats: { chunks: false }, proxy: { - '/api': 'http://localhost:3000', + '/api': 'http://salix-back:3000', '/': { - target: 'http://localhost:3002', + target: 'http://hedera-back:3002', bypass: req => (req.path !== '/' ? req.path : null) } } -- 2.40.1