-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
91 lines (80 loc) · 2.09 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
x-user-args: &user-args
uid: ${UID:-1000}
x-terraform-env: &terraform-env
GITHUB_TOKEN: '${GITHUB_PAT:-${X_GITHUB_PAT:-${GITHUB_TOKEN:-}}}'
TF_CLI_CONFIG_FILE: '${TF_CLI_CONFIG_FILE:-/workspace/.terraformrc}'
TF_VAR_admin_members: '${admin_members:-}'
TF_VAR_billing_account: '${billing_account:-}'
TF_VAR_billing_members: '${billing_members:-}'
TF_VAR_domain: '${domain:-}'
TF_VAR_location: '${location:-}'
TF_VAR_mx_records: '${mx_records:-}'
TF_VAR_region: '${region:-}'
TF_VAR_site_verifications: '${site_verifications:-}'
TF_VAR_zone: '${zone:-}'
x-gcloud-volume: &gcloud-volume
read_only: true
source: ~/.config/gcloud
target: /home/terraform/.config/gcloud
type: bind
x-workspace-volume: &workspace-volume
source: .
target: /workspace
type: bind
consistency: delegated
x-google-dns: &google-dns
dns:
- 8.8.8.8
- 8.8.4.4
x-terraform-svc: &terraform-svc
image: gcr.io/${PROJECT_ID:-local}/terraform
entrypoint: ['terraform']
command: ['init']
init: true
volumes:
- *gcloud-volume
- *workspace-volume
environment:
<<: *terraform-env
x-pnpm-svc: &pnpm-svc
image: gcr.io/${PROJECT_ID:-local}/pnpm
init: true
entrypoint: ['pnpm']
working_dir: /workspace
volumes:
- *workspace-volume
services:
terraform:
<<: [*terraform-svc, *google-dns]
build:
context: ./terraform
cache_from:
- gcr.io/${PROJECT_ID:-local}/terraform
args:
<<: *user-args
entrypoint: ash
command: []
terraform-org:
<<: [*terraform-svc, *google-dns]
working_dir: /workspace/terraform/org
depends_on:
- terraform
terraform-web:
<<: [*terraform-svc, *google-dns]
working_dir: /workspace/terraform/web
depends_on:
- terraform
pnpm:
<<: [*pnpm-svc, *google-dns]
build:
dockerfile: ./docker/pnpm/Dockerfile
context: .
cache_from:
- gcr.io/${PROJECT_ID:-local}/pnpm
args:
<<: *user-args
server:
<<: [*pnpm-svc, *google-dns]
command: ['start', '--http', '--host=0.0.0.0', '--allowed-hosts=localhost']
ports:
- '8080:8080'