Skip to content

Commit

Permalink
Merge pull request google#344 from KQT2000/master
Browse files Browse the repository at this point in the history
Fixed Issue Where Users Weren't Able to View Webpage at localhost
  • Loading branch information
pokowaka authored Jun 26, 2023
2 parents ecf5132 + 5197542 commit 1d5d816
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions js/develop/envoy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ FROM envoyproxy/envoy:v1.26-latest

# Workaround for linux missing host.docker.internal
COPY ./envoy.yaml /etc/envoy/envoy.yaml
EXPOSE 8080
RUN chmod go+r /etc/envoy/envoy.yaml
CMD /usr/local/bin/envoy -c /etc/envoy/envoy.yaml
14 changes: 6 additions & 8 deletions js/develop/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static_resources:
- match:
prefix: "/"
route:
cluster: npm
cluster: nginx
cors:
allow_origin_string_match:
- safe_regex:
Expand Down Expand Up @@ -104,7 +104,6 @@ static_resources:
- name: emulator_service_grpc
connect_timeout: 0.250s
type: STRICT_DNS
http2_protocol_options: {}
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: emulator_service_grpc
Expand All @@ -113,22 +112,21 @@ static_resources:
- endpoint:
address:
socket_address:
address: host.docker.internal
address: emulator
port_value: 8554
- name: npm
- name: nginx
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: npm
cluster_name: nginx
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: host.docker.internal
port_value: 3000
address: nginx
port_value: 80
admin:
access_log_path: "/dev/stdout"
address:
Expand Down
5 changes: 3 additions & 2 deletions js/docker/docker-compose-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ services:
expose:
- "8080"
- "8001"
- "8443"
ports:
- "8080:8080"
- "80:8080"
- "443:8443"
- "8001:8001"

emulator:
image: emulator_emulator:latest
build:
Expand Down
1 change: 1 addition & 0 deletions js/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ services:

nginx:
image: emulator_nginx:latest
network_mode: "host"
container_name: emulator_nginx
networks:
envoymesh:
Expand Down
3 changes: 2 additions & 1 deletion js/docker/envoy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#FROM envoyproxy/envoy:latest
FROM envoyproxy/envoy:v1.26-latest

FROM envoyproxy/envoy:v1.26-latest
COPY ./envoy.yaml /etc/envoy/envoy.yaml
EXPOSE 8080
RUN chmod go+r /etc/envoy/envoy.yaml
CMD /usr/local/bin/envoy -c /etc/envoy/envoy.yaml
2 changes: 0 additions & 2 deletions js/docker/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ static_resources:
- name: emulator_service_grpc
connect_timeout: 0.250s
type: STRICT_DNS
http2_protocol_options: {}
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: emulator_service_grpc
Expand All @@ -119,7 +118,6 @@ static_resources:
connect_timeout: 0.25s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: nginx
endpoints:
Expand Down
1 change: 0 additions & 1 deletion js/src/components/login_firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class SignIn extends React.Component {
firebase.auth().currentUser.getIdToken().then(function (token) {
auth.setToken(`Bearer ${token}`);
});

}
}}
</FirebaseAuthConsumer>
Expand Down
2 changes: 1 addition & 1 deletion js/src/service/auth_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ export class TokenProviderService {
authHeader = () => {
return { Authorization: this.token };
};
}
}

0 comments on commit 1d5d816

Please sign in to comment.