6 Commits

Author SHA1 Message Date
peter 444e2e0cd3 trigger rebuild
continuous-integration/drone/push Build is failing
2026-04-14 11:43:32 +01:00
peter cd902a0daa update versoin
continuous-integration/drone/push Build is failing
2026-04-14 11:14:39 +01:00
peter 504fda9c38 update dockerfile
continuous-integration/drone/push Build is failing
2026-04-14 10:55:34 +01:00
peter 40d852c6c1 update drone.yml
continuous-integration/drone/push Build is failing
2026-04-14 10:07:28 +01:00
peter fd7e4a52a8 change version to 14
continuous-integration/drone/push Build was killed
2026-04-14 09:59:04 +01:00
peter 9010f8789c update file name
continuous-integration/drone/push Build is failing
2026-04-14 09:52:12 +01:00
2 changed files with 47 additions and 28 deletions
+3 -3
View File
@@ -8,10 +8,10 @@ steps:
image: plugins/docker
settings:
registry: registry.petermaquiran.xyz
repo: registry.petermaquiran.xyz/tvone
repo: registry.petermaquiran.xyz/gabinete-web
tags:
- latest
dockerfile: Dockerfile
dockerfile: dockerfile
context: .
# 2. Trigger service update in Docker Swarm
@@ -22,4 +22,4 @@ steps:
curl -X POST https://docker-socket.petermaquiran.xyz/update-service
-H "Authorization: Bearer 123"
-H "Content-Type: application/json"
-d "{\"service\":\"tvone_tvone\",\"image\":\"registry.petermaquiran.xyz/tvone:latest\"}"
-d "{\"service\":\"gabinete_gabinete-web\",\"image\":\"registry.petermaquiran.xyz/gabinete-web:latest\"}"
+28 -9
View File
@@ -1,26 +1,45 @@
# ---------- Build Stage ----------
FROM node:16-alpine AS build
# =========================
# BUILD STAGE
# =========================
FROM node:16.20.2 AS build
WORKDIR /app
# Install Ionic CLI (optional but safe)
RUN npm install -g @ionic/cli@6 @angular/cli@12
# Avoid npm randomness
ENV NPM_CONFIG_LEGACY_PEER_DEPS=true
ENV NPM_CONFIG_AUDIT=false
ENV NPM_CONFIG_FUND=false
# Copy dependency files first (better caching)
COPY package*.json ./
RUN npm install
# Clean install (IMPORTANT: single install only)
RUN npm cache clean --force
RUN npm install --legacy-peer-deps --no-audit --no-fund
# Copy full project
COPY . .
# Build production app
RUN ionic build --prod
# Build Ionic Angular app
RUN npx ionic build --configuration production
# ---------- Run Stage ----------
# =========================
# PRODUCTION STAGE (NGINX)
# =========================
FROM nginx:alpine
# Copy build output to nginx
# Nginx config (optional but recommended for SPA routing)
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
# Clean default nginx files
RUN rm -rf /usr/share/nginx/html/*
# Copy build output from previous stage
COPY --from=build /app/www /usr/share/nginx/html
# Expose port
EXPOSE 80
# Start nginx
CMD ["nginx", "-g", "daemon off;"]