compose.yaml 261 B

1234567891011121314
  1. services:
  2. sample:
  3. image: nginx
  4. volumes:
  5. - data:/data
  6. pre_stop:
  7. - command: sh -c 'echo "In the pre-stop" >> /data/log.txt'
  8. test:
  9. image: nginx
  10. post_start:
  11. - command: sh -c 'echo env'
  12. volumes:
  13. data:
  14. name: sample-data