-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "remove envoy and update docker-compose"
This reverts commit 7f01b51. # Conflicts: # docker/docker-compose-ci.yml # docker/docker-compose.yml
- Loading branch information
Showing
5 changed files
with
167 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
version: '3.3' | ||
|
||
services: | ||
envoy: | ||
build: | ||
context: ./ | ||
dockerfile: ./envoy.Dockerfile | ||
image: 'grpcweb:envoy' | ||
container_name: 'envoy' | ||
restart: always | ||
ports: | ||
- '8080:8080' | ||
- '9901:9901' | ||
command: ['/etc/envoy/envoy.yaml'] | ||
depends_on: | ||
- yorkie | ||
# If you're using Mac or Windows, this special domain name("host.docker.internal" which makes containers able to connect to the host) | ||
# is supported by default. | ||
# But if you're using Linux and want an envoy container to communicate with the host, | ||
# it may help to define "host.docker.internal" in extra_hosts. | ||
# (Actually, other hostnames are available, but in that case you should update clusters[].host configurations of envoy.yaml) | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
yorkie: | ||
image: 'yorkieteam/yorkie:0.4.10' | ||
container_name: 'yorkie' | ||
command: ['server', '--enable-pprof'] | ||
command: [ | ||
'server', | ||
'--enable-pprof', | ||
] | ||
restart: always | ||
ports: | ||
- '8080:8080' | ||
- '8081:8081' | ||
- '11101:11101' | ||
- '11102:11102' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
admin: | ||
access_log_path: /tmp/admin_access.log | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 9901 } | ||
|
||
static_resources: | ||
listeners: | ||
- name: yorkie_rpc_listener | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 8080 } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: ingress_http | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: { prefix: "/" } | ||
route: | ||
cluster: yorkie_rpc_service | ||
# https://github.com/grpc/grpc-web/issues/361 | ||
max_stream_duration: | ||
grpc_timeout_header_max: 0s | ||
cors: | ||
allow_origin_string_match: | ||
- prefix: "*" | ||
allow_methods: GET, PUT, DELETE, POST, OPTIONS | ||
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-api-key,x-shard-key,x-user-agent,x-grpc-web,grpc-timeout,authorization,x-yorkie-user-agent | ||
max_age: "1728000" | ||
expose_headers: custom-header-1,grpc-status,grpc-message | ||
http_filters: | ||
- name: envoy.filters.http.grpc_web | ||
- name: envoy.filters.http.cors | ||
- name: envoy.filters.http.router | ||
clusters: | ||
- name: yorkie_rpc_service | ||
connect_timeout: 0.25s | ||
type: logical_dns | ||
http2_protocol_options: {} | ||
lb_policy: round_robin | ||
load_assignment: | ||
cluster_name: yorkie_cluster | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: yorkie | ||
port_value: 11101 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM envoyproxy/envoy:v1.19.0 | ||
|
||
COPY ./envoy.yaml /etc/envoy/envoy.yaml | ||
COPY ./envoy-ci.yaml /etc/envoy/envoy-ci.yaml | ||
|
||
ENTRYPOINT ["/usr/local/bin/envoy", "-c"] | ||
|
||
CMD /etc/envoy/envoy.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
admin: | ||
access_log_path: /tmp/admin_access.log | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 9901 } | ||
|
||
static_resources: | ||
listeners: | ||
- name: yorkie_rpc_listener | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 8080 } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: ingress_http | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: { prefix: "/" } | ||
route: | ||
cluster: yorkie_rpc_service | ||
# https://github.com/grpc/grpc-web/issues/361 | ||
max_stream_duration: | ||
grpc_timeout_header_max: 0s | ||
cors: | ||
allow_origin_string_match: | ||
- prefix: "*" | ||
allow_methods: GET, PUT, DELETE, POST, OPTIONS | ||
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-api-key,x-shard-key,x-user-agent,x-grpc-web,grpc-timeout,authorization,x-yorkie-user-agent | ||
max_age: "1728000" | ||
expose_headers: custom-header-1,grpc-status,grpc-message | ||
http_filters: | ||
- name: envoy.filters.http.grpc_web | ||
- name: envoy.filters.http.cors | ||
- name: envoy.filters.http.router | ||
clusters: | ||
- name: yorkie_rpc_service | ||
connect_timeout: 0.25s | ||
type: logical_dns | ||
http2_protocol_options: {} | ||
lb_policy: round_robin | ||
# Input the address which envoy can connect to as a yorkie server. | ||
# When you want envoy container to communicate with your host machine, you should set as the following | ||
# - Windows/Mac: Input host.docker.internal | ||
# - Linux: an IP address of the host machine or docker-0 interface or some addresses defined in extra hosts of docker-compose.yml | ||
# you can simply use the yorkie container name(e.g. yorkie) in docker-compose whatever your OS is. | ||
load_assignment: | ||
cluster_name: yorkie_cluster | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: host.docker.internal | ||
port_value: 11101 |