diff --git a/angularVinos/.dockerignore b/angularVinos/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..3dbbcf3e707bbeadeca29139f67694b695a211ab --- /dev/null +++ b/angularVinos/.dockerignore @@ -0,0 +1,25 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/bin +**/charts +**/docker-compose* +**/compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md diff --git a/angularVinos/Dockerfile b/angularVinos/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..f3d23cde9ffc0085d07957f1c57c476d51f4a0c8 --- /dev/null +++ b/angularVinos/Dockerfile @@ -0,0 +1,10 @@ +FROM node:23 AS build +RUN mkdir -p /app +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . /app +RUN npm run build --prod +FROM nginx:alpine +COPY --from=build /app/dist/ej-rest-client/browser/ /usr/share/nginx/html +COPY --from=build /app/nginx-custom.conf /etc/nginx/conf.d/default.conf diff --git a/angularVinos/nginx-custom.conf b/angularVinos/nginx-custom.conf new file mode 100644 index 0000000000000000000000000000000000000000..0595e878249d6a1d3d45dc63ba20921d112a3840 --- /dev/null +++ b/angularVinos/nginx-custom.conf @@ -0,0 +1,8 @@ +server { +listen 80; +location / { +root /usr/share/nginx/html; +index index.html index.htm; +try_files $uri $uri/ /index.html =404; +} +} diff --git a/springVinos/docker-compose.debug.yml b/docker-compose.debug.yml similarity index 100% rename from springVinos/docker-compose.debug.yml rename to docker-compose.debug.yml diff --git a/springVinos/docker-compose.yml b/docker-compose.yml similarity index 78% rename from springVinos/docker-compose.yml rename to docker-compose.yml index bd82a266c21c855dea3774a48a49563f3d1630fa..44544bea3c77bcc1e65aa50141cdf012e5bc2a23 100644 --- a/springVinos/docker-compose.yml +++ b/docker-compose.yml @@ -8,10 +8,22 @@ networks: # Red interna para comunicar los servicios kong-net: {} services: + front: + image: my-angular-app + build: + context: ./angularVinos + dockerfile: ./Dockerfile + restart: unless-stopped + ports: + - "4200:80" + networks: + - kong-net + + Vinos-API: image: tiendavinos-api-image build: - context: . + context: ./springVinos dockerfile: ./Dockerfile restart: unless-stopped ports: