Advertisement
Chinnaphat

docker-compose.services.yml

May 18th, 2024
494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.27 KB | Source Code | 0 0
  1. services:
  2.   proxy:
  3.     image: gkg0139/baemon-proxy-server
  4.     ports:
  5.      - "80:80"
  6.       - "443:443"
  7.     networks:
  8.      - services-network
  9.     restart: unless-stopped
  10.     depends_on:
  11.      - frontend
  12.       - backend
  13.  
  14.   frontend:
  15.     image: gkg0139/baemon-frontend
  16.     networks:
  17.      - services-network
  18.     restart: unless-stopped
  19.     healthcheck:
  20.       test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
  21.       interval: 30s
  22.       timeout: 10s
  23.       retries: 5
  24.  
  25.   backend:
  26.     image: gkg0139/baemon-backend
  27.     environment:
  28.      - MYSQL_HOST=db
  29.       - MYSQL_PASSWORD=86Iojkiyd
  30.     networks:
  31.      - db-network
  32.       - services-network
  33.     restart: unless-stopped
  34.     depends_on:
  35.      - db
  36.     healthcheck:
  37.       test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
  38.       interval: 30s
  39.       timeout: 10s
  40.       retries: 5
  41.  
  42.   watchtower:
  43.     image: containrrr/watchtower
  44.     volumes:
  45.      - /var/run/docker.sock:/var/run/docker.sock
  46.       - /root/.docker/config.json:/config.json
  47.     command: --interval 60 --cleanup
  48.     restart: unless-stopped
  49.     environment:
  50.       WATCHTOWER_NOTIFICATION_REPORT: "true"
  51.       WATCHTOWER_NOTIFICATION_URL: >
  52.        discord://lHj42FGSPfkziC3v6MmkHz-1Zio7h409hpFV3iiw4WdVdfhSY9AIqWlrFCKH6iNBWdTo@1234089000151683083
  53.       WATCHTOWER_NOTIFICATION_TEMPLATE: |
  54.        {{- if .Report -}}
  55.           {{- with .Report -}}
  56.             {{- if ( or .Updated .Failed ) -}}
  57.         {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed
  58.               {{- range .Updated}}
  59.         - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
  60.               {{- end -}}
  61.               {{- range .Fresh}}
  62.         - {{.Name}} ({{.ImageName}}): {{.State}}
  63.             {{- end -}}
  64.             {{- range .Skipped}}
  65.         - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
  66.             {{- end -}}
  67.             {{- range .Failed}}
  68.         - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
  69.             {{- end -}}
  70.           {{- end -}}
  71.           {{- end -}}
  72.         {{- else -}}
  73.           {{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}
  74.         {{- end -}}
  75.  
  76. networks:
  77.   services-network:
  78.     name: services-network
  79.   db-network:
  80.     name: db-network
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement