forked from eko/monday
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
173 lines (152 loc) · 5.26 KB
/
example.yaml
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
165
166
167
168
169
170
171
172
173
# Settings
kubeconfig: /dev/custom/.kube/config # Optional, default to user's .kube/config file path
gopath: /dev/golang # Optional, default to user's $GOPATH env var
watcher: # Optional
exclude: # Optional, in case you want to exclude some (sub-)directories from file watching
- .git
- node_modules
- /event/an/absolute/path
# Local applications
<: &graphql-local
name: graphql
path: github.com/eko/graphql # Will find in GOPATH (as executable is "go")
watch: true # Default: false (do not watch directory)
hostname: graphql.svc.local # Optional, in case you want to map a specific hostname with a single IP address
executable: go
args:
- run
- cmd/main.go
env: # Optional, in case you want to specify some environment variables for this app
HTTP_PORT: 8005
env_file: "github.com/eko/graphql/.env" # Optional, in case you want to specify some environment variables from a file
setup: # Optional, in case you want to setup the project first if directory does not exists
- go get github.com/eko/graphql
- echo You can use ~/path syntax and environment variables like $GOPATH in your commands
<: &grpc-api-local
name: grpc-api
path: github.com/eko/grpc-api # Will find in GOPATH (as executable is "go")
watch: true # Default: false (do not watch directory)
hostname: grpc-api.svc.local # Optional, in case you want to map a specific hostname with a single IP address
executable: go
args:
- run
- main.go
env: # Optional, in case you want to specify some environment variables for this app
GRPC_PORT: 8006
env_file: "github.com/eko/grpc-api/.env" # Optional, in case you want to specify some environment variables from a file
setup: # Optional, in case you want to setup the project first if directory does not exists
- go get github.com/eko/grpc-api
- echo You can use ~/path syntax and environment variables like $GOPATH in your commands
<: &elasticsearch-local
name: elasticsearch
path: /Users/vincent/dev/docker
watch: true # Default: false (do not watch directory)
executable: docker
args:
- start
- -i
- elastic
stop_executable: docker # Optional, but useful for stopping containers for instance
stop_args: # Optional
- stop
- elastic
# Kubernetes forwards
<: &kubernetes-context preprod
# Example of Kubernetes local port-forward: forward a specific pod port locally
# This is cool for avoiding to run applications locally and hit an environment from your
# local machine
<: &graphql-forward
name: graphql
type: kubernetes
values:
context: *kubernetes-context
namespace: backend
disable_proxy: true # In case you don't want to proxy ports, use this option
labels:
app: graphql
hostname: graphql.svc.local # Optional
ports:
- 8080:8000
# Example of Kubernetes remote-forward: this replaces your current pod in an environment with
# a proxy that allows us to forward traffic locally. This is really cool to debug on an environment
# but we disaprove using it on your production environment!
<: &grpc-api-kubernetes-remote
name: grpc-api
type: kubernetes-remote
values:
context: *kubernetes-context
namespace: backend
labels:
app: grpc-api
ports:
- 8080:8080
- 8001:8001
<: &grpc-api-forward
name: grpc-api
type: kubernetes
values:
context: *kubernetes-context
namespace: backend
labels:
app: grpc-api
hostname: grpc-api.svc.local # Optional
ports:
- 8080:8080
# SSH Forwards
# Example of SSH local forward: forward a specific remote port locally
# Here, I'm forwarding on port 8080 locally my production website (port 80)
# I am also pointing the SSH forward to the bastion.svc.local hostname so the SSH
# command will be: ssh -L 80:bastion.svc.local:8080 [email protected]
<: &composieux-fr-local
name: composieux-fr-local
type: ssh
values:
remote: [email protected] # SSH <user>@<hostname>
args:
- "-i/Users/name/.ssh/private_key"
forward_hostname: bastion.svc.local # Optional, SSH forward hostname. Defaults to 127.0.0.1
hostname: composieux.fr.svc.local # Optional
ports:
- 8080:80
# Example of SSH remote forward: forward all trafic on remote to a local application
# You don't have to do this at home but here, I'm forwarding all my production traffic
# on my local machine.
<: &composieux-fr-remote
name: composieux-fr-remote
type: ssh-remote
values:
remote: [email protected] # SSH <user>@<hostname>
args:
- "-i/Users/name/.ssh/private_key"
ports:
- 8080:80
# Proxy forwards
# Example of Proxy forward type: this will allow you to call locally elasticsearch.svc.local:9200
# and your call will be proxified to vpc-xxx-rO6gjlqbkwzmzde.eu-west-3.es.amazonaws.com:443
<: &elasticsearch-proxy
name: elasticsearch-proxy
type: proxy
values:
hostname: elasticsearch.svc.local
proxy_hostname: vpc-xxx-rO6gjlqbkwzmzde.eu-west-3.es.amazonaws.com
ports:
- 9200:443
# Projects
projects:
- name: full
local:
- *graphql-local
- *grpc-api-local
- *elasticsearch-local
- name: graphql
local:
- *graphql-local
forward:
- *grpc-api-forward
- name: forward-only
forward:
- *graphql-forward
- *grpc-api-forward
- name: forward-composieux-website
forward:
- *composieux-fr-local