-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
164 lines (161 loc) · 10.3 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
services:
dev:
container_name: "${COMPOSE_PROJECT_NAME}-${DEV_CONTAINER_NAME-dev}"
stdin_open: true
tty: true
networks:
devnet:
extra_hosts:
- "host.docker.internal:host-gateway"
build:
context: .
dockerfile: Dockerfile
args:
- ROOT_PW # sets root password in container
- PULUMI_VERSION # install this version of pulumi
- TERRAFORM_VERSION # install this version of terraform. default is 'latest'
- PHP_VERSION # 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1
- USE_DOT_NET # install ubuntu:latest dotnet core packages
- GOLANG_VERSION # install this golang version. blank for none. latest is 1.18
- PYTHON_VERSION # install this python version
- PIP_EXTRA_REQUIREMENTS_TXT # install extra pip requirements if python is installed
- USE_AWS # install latest aws cli, ssm plugin, and ecr helper
- NODE_VERSION # install this version of node. blank for none
- RUST_VERSION # install this version of rust. blank for none
- CARGO_EXTRA # extra cargo packages to install
- USE_BITWARDEN # enable bitwarden workflow helpers. will enable NODE_VERSION=18 if not set
- USE_CDK # install aws cdk, terraform and cdk for terraform
- USE_JAVA # install ubuntu:latest openjdk packages
- EXTRA_PACKAGES # any extra Ubuntu packages you want installed into the base container
- AWS_VERSION # install AWS CLI version
- HOST_PROJECT_FOLDER_NAME
environment:
- ARCH
- AWS_VERSION
- COMPOSE_PROJECT_NAME
- PROJECT_NAME=${COMPOSE_PROJECT_NAME}
- GDC_CONTAINER_NAME # name of GDC container running in docker
- GDC_DNS_PRI_IP # ip gdc should use for primary DNS. defaults to 8.8.8.8 but can be changed to localstack container or other source
- GDC_DNS_SEC_IP # ip gdc should use for secondary DNS. Cant be same as GDC_DNS_PRI_IP
- DOCKER_OS_PLATFORM # can be used to build containers for other arch's
- HOST_PROJECT_PATH # helps with volume mounts if you run containers from within dev container
- HOST_PROJECT_FOLDER_NAME # dirname $HOST_PROJECT_PATH
- HOST_OS=${OS:-} # used to remap paths in windows format to linux format
- USE_HOST_HOME # mount home directory from host readonly
- USE_HOST_HOME_RW # mount home directory from host read write
- USE_HOME_BIN # copy bin folder from host home directory if it exists and USE_HOST_HOME=yes to container home directory
- USE_PRECOMMIT # use pre-commit hooks in git to format and lint files
- EDITOR # sets default editor in container. usually set to same as VISUAL
- VISUAL # sets default editor in container. usually set to same as EDITOR
- USE_COLOR_PROMPT # enable colored bash prompt
- SHOW_VERSIONS_ON_LOGIN # show versions of installed tools on login
- SSH_SERVER_PORT # host port you want forwarded to ssh server in container
- SSH_KEYSCAN_HOSTS # copy ssh keys from these hosts to prevent unknown key prompts
- USE_AUTH0 # starts up auth0 mock container in container only mode
- USE_AUTH0_HOST # starts up auth0 mock container and forwards port from host. Use AUTH0_HOST_PORT to change default of 3001
- AUTH0_HOST_PORT # defaults to 3001 if not specified. only used with USE_AUTH0_HOST
- AUTH0_DOMAIN # url for hitting auth0 server
- AUTH0_ACCESS_TOKEN_EXP # custom token exp for access token auth0 server
- AUTH0_ID_TOKEN_EXP # custom token exp for ID token auth0 server
- AUTH0_CONTAINER_NAME # set name of auth0 container so more than one can be used in parallel
- AUTH0_LOCAL_USERS_FILE # used to specify location in container for auth0 to mount user override file
- AUTH0_AUDIENCE # used to override auth0 audience default of app
- AUTH0_DEFAULT_USER # used to auto-populate auth0 mock login page
- AUTH0_DEFAULT_PASSWORD # used to auto-populate auth0 mock login page
- LOCALSTACK_VOLUME_DIR # needed by LS v1.x. no effect when LS is not being used
- USE_LOCALSTACK # does not install or start localstack. Only sets up some helpers
- USE_LOCALSTACK_PRO # does not install or start localstack. Only sets up license key vars
- USE_LOCALSTACK_DNS # this will put LS container on static ip and set GDC to use its DNS. default no
- USE_LOCALSTACK_PERSISTENCE # toggle persistent storage for LS defaults to persistence enabled.
- USE_LOCALSTACK_HOST # forwards localstack ports to host if LS_VERSION is set
- LOCALSTACK_HOSTNAME # contains hostname of container or host depending on mode
- LS_DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM # used by localstack dns server to resolve upstream requests
- LS_IMAGE # can override with custom image location. Still uses LS_VERSION to create final image location
- LS_VERSION # starts up localstack with specified version >= 1.x.x.
- LS_MAIN_CONTAINER_NAME # used by localstack
- LOCALSTACK_API_KEY # required if you want to use localstack pro
- LOCALSTACK_AUTH_TOKEN # future LocalStack Auth token support
- LOCALSTACK_HOST_DNS_PORT # forward this port from host to localstack for DNS
- LOCALSTACK_STATIC_IP # set static container ip for LS. Useful for DNS
- PERSIST_BITWARDEN_SESSION # persist unlocked vault creds between container sessions
- USE_CDK # install cdk if set to yes
- USE_AWS_HOME # copy .aws folder from host home if exists and USE_HOST_HOME=yes
- USE_AWS_SYMLINK # use symlink to home .aws if exists and USE_HOST_HOME=yes and USE_AWS_HOME=yes
- AWS_IDENTITY_ACCOUNT # used by AWS assume-role.sh script
- GIT_EMAIL # required for GIT if you don't have a .gitconfig in your home directory
- GIT_NAME # required for GIT if you don't have a .gitconfig in your home directory
- LOCALSTACK_HOST # used by localstack
- LOCALSTACK_GATEWAY_LISTEN # used by localstack
- YARN_CACHE_FOLDER=/usr/local/share/.cache/yarn # cache yarn installs
- PIP_CACHE_DIR=/usr/local/share/.cache/pip # cache pip installs
- npm_config_cache=/usr/local/share/.cache/npm # case npm installs
- GDC_ENTRYPOINT # run this command and exit unless GDC_RUN_MODE
- GDC_DIR # contains host location of GDC folder
- GDC_COMPOSE_FILES # contains list of all compose files in use by GDC
- SHARED_VOLUMES # list of volumes shared between all GDCs
- CUSTOM_PORTS # list of custom port forwards
- DEVNET_NAME # name of dev network GDC is attached to
- DEVNET_SUBNET # only populated if manually specified
- DEVNET_GATEWAY # only populated if manually specified
- GDC_RUN_MODE # start, stop, daemon, clean
- CI_JOB_TOKEN # used for gitlab pipeline clones
- CI_PROJECT_DIR # used for gitlab pipeline mounts
- CI_JOB_ID # used for gitlab pipeline uuid
- GIT_HASH # used for gitlab pipelines
- GIT_SLUG # used for gitlab pipelines
- HOST_CUSTOM_MOUNT # used to mount custom dir on host to /host_custom_mount in container
- HOST_HOME # path to home directory of user on host
- CHECK_UPDATES # check for GDC updates on each login
- PARENT_GDC # if GDC is launched from inside another GDC this will be set to name of parent
- NO_DEVNET_RM # if set to yes, GDC will not remove the DEVNET
- STARTUP_MSG # message to display after startup
- CLIPBOARD_MSG # used internally to show message about launch command copied to clipboard
- COMPOSE_BIN # used to toggle between docker-compose and docker compose invocations
- COPY_CMD_TO_CLIPBOARD # defaults to yes to copy gdc shell-launch command to clipboard
- HOST_PROJECT_REL_PATH # Project path on host relative to GDC repository
- USE_PROXY # can be no/proxy/dump/web. defaults to no
- USE_PROXY_HOST # can be no/yes. defaults to no
- USE_PROXY_CA # if yes and USE_PROXY is not set to no then install proxy CA in GDC
- PROXY_VERSION # version of proxy image to start. default to latest
- PROXY_CONTAINER_NAME # name of proxy container. defaults to proxy
- PROXY_HOST_PORT # proxy port. defaults to 8080
- PROXY_WEB_HOST_PORT # when running in web mode defaults to port 8081
- PROXY_VOLUME_DIR # where to persist cert files. defaults to /tmp/mitproxy
- PROXY_URL # http proxy to use. if USE_PROXY_HOST is enabled will be set to http://PROXY_CONTAINER_NAME:8080
- PROXY_URL_SSL # https proxy to use. if USE_PROXY_HOST is enabled will be set to https://PROXY_CONTAINER_NAME:8080
- PROXY_AUTO_EXPORT_ENV # auto export HTTP_PROXY and HTTPS_PROXY vars equal to PROXY_URL
- DEV_CONTAINER=1.10.26 # used to detect if running inside dev container
volumes:
- /var/run/docker.sock:/var/run/docker.sock # allow container to interact with host docker
- "${GDC_DIR}:/root/gdc-host:ro" # mount gdc folder inside container to get access to compose files
- bash_history:/root/bash_history # keep bash history between container builds
- persisted:/root/persisted # put things you want to persist between container rebuilds here
- shared:/root/shared # persisted and shared between stacks / containers
- package_cache:/usr/local/share/.cache # persist npm, yarn and pip cache for faster rebuilds
- pulumi:/root/.pulumi # persist pulumi plugin install
- terraform:/root/.terraform_plugin_cache # persist terraform plugin install
- cache:/root/.cache # persist caches in ~/.cache folder
- home_config:/root/.config # persist data for various apps such as bitwarden
volumes:
bash_history: # persist bash history
persisted: # put things you want to persist between container rebuilds here
cache: # .cache folder in home dir
terraform: # persist terraform plugin install across all stacks
name: terraform
external: true
pulumi:
name: pulumi # persist pulumi plugin install across all stacks
external: true
package_cache: # persist npm, yarn and pip cache, this volume is persisted and shared between all stacks
name: pkg_cache
external: true
shared: # this volume is persisted and shared between all stacks
name: shared
external: true
home_config: # this volume is persisted and shared between all stacks
name: home_config
external: true
networks:
devnet:
name: ${DEVNET_NAME-devnet} # used to communicate between containers and local stack
external: true