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 image: plugins/docker
settings: settings:
registry: registry.petermaquiran.xyz registry: registry.petermaquiran.xyz
repo: registry.petermaquiran.xyz/tvone repo: registry.petermaquiran.xyz/gabinete-web
tags: tags:
- latest - latest
dockerfile: Dockerfile dockerfile: dockerfile
context: . context: .
# 2. Trigger service update in Docker Swarm # 2. Trigger service update in Docker Swarm
@@ -22,4 +22,4 @@ steps:
curl -X POST https://docker-socket.petermaquiran.xyz/update-service curl -X POST https://docker-socket.petermaquiran.xyz/update-service
-H "Authorization: Bearer 123" -H "Authorization: Bearer 123"
-H "Content-Type: application/json" -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\"}"
+44 -25
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 WORKDIR /app
# Install Ionic CLI (optional but safe) # Avoid npm randomness
RUN npm install -g @ionic/cli@6 @angular/cli@12 ENV NPM_CONFIG_LEGACY_PEER_DEPS=true
ENV NPM_CONFIG_AUDIT=false
COPY package*.json ./ ENV NPM_CONFIG_FUND=false
RUN npm install
# Copy dependency files first (better caching)
COPY . . COPY package*.json ./
# Build production app # Clean install (IMPORTANT: single install only)
RUN ionic build --prod RUN npm cache clean --force
RUN npm install --legacy-peer-deps --no-audit --no-fund
# ---------- Run Stage ----------
FROM nginx:alpine # Copy full project
COPY . .
# Copy build output to nginx
COPY --from=build /app/www /usr/share/nginx/html # Build Ionic Angular app
RUN npx ionic build --configuration production
# Expose port
EXPOSE 80
# =========================
CMD ["nginx", "-g", "daemon off;"] # PRODUCTION STAGE (NGINX)
# =========================
FROM nginx:alpine
# 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;"]