fix: restart_policy any + remove dockerfile healthcheck causing swarm complete state
This commit is contained in:
parent
c756249690
commit
b4ae2718f7
2 changed files with 6 additions and 5 deletions
|
|
@ -36,7 +36,9 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: any
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 5
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
|
|
@ -58,7 +60,9 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: any
|
||||||
|
delay: 5s
|
||||||
|
max_attempts: 5
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
- "traefik.docker.network=proxy"
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,3 @@ COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
|
|
||||||
CMD wget -qO- http://localhost/health || exit 1
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue