diff --git a/docker/docker-compose-ci.yml b/docker/docker-compose-ci.yml index 2ebf0ada3..5a852e492 100644 --- a/docker/docker-compose-ci.yml +++ b/docker/docker-compose-ci.yml @@ -1,31 +1,14 @@ 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-ci.yaml'] - depends_on: - - yorkie yorkie: - image: 'yorkieteam/yorkie:0.4.7' + image: 'yorkieteam/yorkie:latest' container_name: 'yorkie' - command: [ - 'server', - '--mongo-connection-uri', - 'mongodb://mongo:27017', - ] + command: ['server', '--mongo-connection-uri', 'mongodb://mongo:27017'] restart: always ports: - - '11101:11101' - - '11102:11102' + - '8080:8080' + - '8081:8081' depends_on: - mongo mongo: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 18bc6b1b9..c03eda524 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,34 +1,11 @@ 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.7' + image: 'yorkieteam/yorkie:latest' container_name: 'yorkie' - command: [ - 'server', - '--enable-pprof', - ] + command: ['server', '--enable-pprof'] restart: always ports: - - '11101:11101' - - '11102:11102' + - '8080:8080' + - '8081:8081' diff --git a/docker/envoy-ci.yaml b/docker/envoy-ci.yaml deleted file mode 100644 index 416e72a25..000000000 --- a/docker/envoy-ci.yaml +++ /dev/null @@ -1,54 +0,0 @@ -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 diff --git a/docker/envoy.Dockerfile b/docker/envoy.Dockerfile deleted file mode 100644 index 60b660b76..000000000 --- a/docker/envoy.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -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 diff --git a/docker/envoy.yaml b/docker/envoy.yaml deleted file mode 100644 index 69b92bcc5..000000000 --- a/docker/envoy.yaml +++ /dev/null @@ -1,59 +0,0 @@ -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