diff --git a/Stacks/app/dockerfile b/Stacks/app/dockerfile new file mode 100644 index 0000000..f4795e0 --- /dev/null +++ b/Stacks/app/dockerfile @@ -0,0 +1,3 @@ +FROM nginx:1.21.6 + +RUN echo 'Mi página de inicio personalizada como frontend' > /usr/share/nginx/html/index.html \ No newline at end of file diff --git a/Stacks/docker-compose.yml b/Stacks/docker-compose.yml new file mode 100644 index 0000000..0ea0136 --- /dev/null +++ b/Stacks/docker-compose.yml @@ -0,0 +1,30 @@ +services: + web: + image: nginx:latest + ports: + - "80:80" + deploy: + replicas: 3 + update_config: + parallelism: 1 + delay: 10s + restart_policy: + condition: on-failure + networks: + - frontend + + app: + image: frontend:latest + deploy: + replicas: 5 + restart_policy: + condition: any + networks: + - frontend + - backend + +networks: + frontend: + driver: overlay + backend: + driver: overlay \ No newline at end of file