-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevcontainer.json
More file actions
70 lines (70 loc) · 2.67 KB
/
Copy pathdevcontainer.json
File metadata and controls
70 lines (70 loc) · 2.67 KB
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
{
"name": "Drupal Example",
"dockerComposeFile": "docker-compose.yml",
"service": "drupal",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"hostRequirements": {
"memory": "7gb"
},
"forwardPorts": [
8080
],
"portsAttributes": {
"mariadb:3306": {
"label": "mariadb",
"onAutoForward": "silent"
},
"8080": {
"label": "httpd",
"onAutoForward": "silent"
},
"9000": {
"label": "xdebug",
"onAutoForward": "silent"
}
},
"containerEnv": {
// Tell our scripts where to find the workspace
"WORKSPACE_FOLDER": "${containerWorkspaceFolder}",
// Inherit (optional) Atuin key and password from local environment to setup sync.
"ATUIN_KEY": "${localEnv:ATUIN_KEY}",
"ATUIN_PASSWORD": "${localEnv:ATUIN_PASSWORD}",
// Codespaces sets GITHUB_TOKEN, and github-cli respects that but prioritizes GH_TOKEN.
// So we can have one config that works with GITHUB_TOKEN on Codespaces and GH_TOKEN locally.
"GH_TOKEN": "${localEnv:GH_TOKEN}",
// Inherit (optional) terminus token from local environment for auto-login.
"TERMINUS_TOKEN": "${localEnv:TERMINUS_TOKEN}",
// Inherit (optional) devops terminus token from local environment for auto-login. This is intended only as a fallback in case personal terminus token isn't set, and is used only during creation. This is intended only for Codespaces, but is supported in devcontainers for troubleshooting.
"DEVOPS_TERMINUS_TOKEN": "${localEnv:DEVOPS_TERMINUS_TOKEN}"
},
// Set defaults for mysql command line, db-rebuild.sh, and script/pantheon/deploy-to-*
"remoteEnv": {
"TERMINUS_SITE": "uceap-example",
"MYSQL_HOST": "mariadb",
"MYSQL_TCP_PORT": "3306",
"MYSQL_USER": "drupal",
"MYSQL_PASSWORD": "password",
"MYSQL_DATABASE": "drupal",
"REDIS_HOST": "redis"
},
// GitHub Codespaces secrets
"secrets": {
"ATUIN_KEY": {
"description": "Set your Atuin key for sync (OPTIONAL)",
"documentationUrl": "https://docs.atuin.sh/guide/sync/"
},
"ATUIN_PASSWORD": {
"description": "Set your Atuin password for sync (OPTIONAL)",
"documentationUrl": "https://docs.atuin.sh/guide/sync/"
},
"TERMINUS_TOKEN": {
"description": "Set your Pantheon machine token to use terminus",
"documentationUrl": "https://docs.pantheon.io/machine-tokens"
}
},
// Run lifecycle scripts from our custom image (they will invoke local scripts if we have them)
"onCreateCommand": "uceap devcontainer-on-create",
"postCreateCommand": "uceap devcontainer-post-create",
"updateContentCommand": "uceap devcontainer-update-content",
"postStartCommand": "uceap devcontainer-post-start"
}