compose.yaml 524 B

12345678910111213141516171819202122232425262728293031
  1. services:
  2. serviceA:
  3. image: alpine
  4. build: .
  5. ports:
  6. - 80:8080
  7. networks:
  8. - private-network
  9. configs:
  10. - source: my-config
  11. target: /etc/my-config1.txt
  12. serviceB:
  13. image: alpine
  14. build: .
  15. ports:
  16. - 8081:8082
  17. secrets:
  18. - my-secrets
  19. networks:
  20. - private-network
  21. - public-network
  22. configs:
  23. my-config:
  24. file: my-config.txt
  25. secrets:
  26. my-secrets:
  27. file: not-so-secret.txt
  28. networks:
  29. private-network:
  30. internal: true
  31. public-network: {}