fix(dockerfile-fontend)
This commit is contained in:
@@ -34,7 +34,7 @@ COPY . .
|
||||
# Copier le build prod
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Config nginx - écrire dans le fichier principal
|
||||
# Config nginx
|
||||
RUN echo 'worker_processes auto; \
|
||||
events { worker_connections 1024; } \
|
||||
http { \
|
||||
@@ -45,7 +45,7 @@ http { \
|
||||
gzip on; \
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; \
|
||||
server { \
|
||||
listen 8080; \
|
||||
listen 8082; \
|
||||
root /usr/share/nginx/html; \
|
||||
index index.html; \
|
||||
location / { \
|
||||
@@ -62,13 +62,13 @@ http { \
|
||||
RUN echo '#!/bin/sh' > /entrypoint.sh && \
|
||||
echo 'if [ "$MODE" = "dev" ]; then' >> /entrypoint.sh && \
|
||||
echo ' echo "🔧 Mode DEVELOPPEMENT"' >> /entrypoint.sh && \
|
||||
echo ' exec npm run dev -- --host 0.0.0.0 --port 8080' >> /entrypoint.sh && \
|
||||
echo ' exec npm run dev -- --host 0.0.0.0 --port 8082' >> /entrypoint.sh && \
|
||||
echo 'else' >> /entrypoint.sh && \
|
||||
echo ' echo "🚀 Mode PRODUCTION"' >> /entrypoint.sh && \
|
||||
echo ' exec nginx -g "daemon off;"' >> /entrypoint.sh && \
|
||||
echo 'fi' >> /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 8082
|
||||
|
||||
CMD ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user