generated from mazgi/template.containerized-provisioning-project
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
92 lines (89 loc) · 2.81 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# https://docs.docker.com/compose/compose-file/compose-file-v3/#extension-fields
x-service-provisioning-base: &provisioning-base
build:
args:
GID: ${GID:-0}
UID: ${UID:-0}
context: Dockerfile.d/provisioning
command:
- zsh
- -ic
- |
docker-util.keep-running.zsh --reset-status
/workspace/scripts/provisioning.init-terraform-with-backend.zsh --backend=$${_TERRAFORM_BACKEND_TYPE}\
&& docker-util.keep-running.zsh --record-success\
|| {
docker-util.keep-running.zsh --record-failure
exit 1
}
docker-util.keep-running.zsh --wait-signals
environment: &provisioning-base-environment
PROJECT_UNIQUE_ID: ~
# <AWS>
AWS_ACCESS_KEY_ID: ~
AWS_ACCOUNT_ID: ~
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-east-1}
AWS_SECRET_ACCESS_KEY: ~
# </AWS>
# <Azure>
AZURE_DEFAULT_LOCATION: ${AZURE_DEFAULT_LOCATION:-centralus}
ARM_CLIENT_ID: ~
ARM_CLIENT_SECRET: ~
ARM_SUBSCRIPTION_ID: ~
ARM_TENANT_ID: ~
# </Azure>
# <Google>
CLOUDSDK_CORE_PROJECT: ~
GCP_DEFAULT_REGION: ${GCP_DEFAULT_REGION:-us-central1}
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS:-/workspace/config/credentials/google-cloud-keyfile.provisioning-owner.json}
# </Google>
# Suppress to be created the ".terraform" directory in the working directory.
TF_DATA_DIR: /tmp/provisioning/.terraform
TF_PLUGIN_CACHE_DIR: /tmp/provisioning/.terraform.d/plugin-cache
_TERRAFORM_BACKEND_TYPE: ${_TERRAFORM_BACKEND_TYPE:-none}
TF_VAR_aws_access_key: ${AWS_ACCESS_KEY_ID}
TF_VAR_aws_default_region: ${AWS_DEFAULT_REGION:-us-east-1}
TF_VAR_aws_secret_key: ${AWS_SECRET_ACCESS_KEY}
TF_VAR_azure_default_location: ${AZURE_DEFAULT_LOCATION:-centralus}
TF_VAR_gcp_default_region: ${GCP_DEFAULT_REGION:-us-central1}
TF_VAR_gcp_project_id: ${CLOUDSDK_CORE_PROJECT}
TF_VAR_project_unique_id: ${PROJECT_UNIQUE_ID}
init: true
user: "${UID:-0}:${GID:-0}"
volumes:
- provisioning-tmp:/tmp/provisioning
- provisioning-home-developer:/home/developer
- provisioning-home-root:/root # for macOS & Windows
- .:/workspace
working_dir: /workspace/provisioning
services:
# You are able to implement your service like below.
provisioning:
<<: *provisioning-base
# for Prettier Code Formatter
vscode:
build:
args:
GID: ${GID:-0}
UID: ${UID:-0}
context: Dockerfile.d/vscode
command:
- bash
- -c
- |
npm-check-updates --upgrade
npm install
npm audit fix
sort-package-json
user: ${UID:-0}:${GID:-0}
volumes:
- .:/workspace
working_dir: /workspace
version: "3.9"
volumes:
provisioning-tmp:
driver: local
provisioning-home-developer:
driver: local
provisioning-home-root:
driver: local