Add deploy.sh
This commit is contained in:
+6
-14
@@ -1,17 +1,9 @@
|
||||
FROM docker.io/nginx:alpine
|
||||
FROM alpine:latest
|
||||
|
||||
# Remove default nginx static assets
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
WORKDIR /app
|
||||
|
||||
# Copy landing page files to nginx web root
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
COPY styles.css /usr/share/nginx/html/
|
||||
COPY script.js /usr/share/nginx/html/
|
||||
COPY media /usr/share/nginx/html/media
|
||||
# El script le pasará los archivos clonados a esta carpeta
|
||||
COPY . /app
|
||||
|
||||
# Optional: custom nginx config for SPA or security headers
|
||||
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 8090
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# Al arrancar, el contenedor vacía el volumen compartido y copia los archivos nuevos
|
||||
CMD rm -rf /publico/* && cp -r ./* /publico/ && echo "✅ Sitio web actualizado con éxito."
|
||||
|
||||
Reference in New Issue
Block a user