- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2019-04-02T05:50:29+09:00","default:ryuichi","ryuichi")
* コンテナ間で環境変数を共有する [#aa3c9485]
version: '3.4'
x-common-variables: &common-variables
VARIABLE: some_value
ANOTHER_VARIABLE: another_value
services:
some_service:
image: someimage
environment: *common-variables
another_service:
image: anotherimage
environment:
<<: *common-variables
NON_COMMON_VARIABLE: 'non_common_value'
** 参考 [#e1e5d332]
https://stackoverflow.com/questions/36283908/re-using-environmental-variables-in-docker-compose-yml