mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-25 13:24:18 +00:00
Add temporary redirect site for Open Match (#200)
This commit is contained in:
5
Makefile
5
Makefile
@ -618,6 +618,9 @@ browse-site: build/site/
|
||||
deploy-dev-site: build/site/
|
||||
cd $(BUILD_DIR)/site && gcloud $(OM_SITE_GCP_PROJECT_FLAG) app deploy .app.yaml --promote --version=$(VERSION_SUFFIX) --quiet
|
||||
|
||||
deploy-redirect-site:
|
||||
cd $(REPOSITORY_ROOT)/site/redirect/ && gcloud $(OM_SITE_GCP_PROJECT_FLAG) app deploy app.yaml --promote --quiet
|
||||
|
||||
run-site: build/toolchain/bin/hugo$(EXE_EXTENSION)
|
||||
cd site/ && ../build/toolchain/bin/hugo$(EXE_EXTENSION) server --debug --watch --enableGitInfo . --bind 0.0.0.0 --port $(SITE_PORT) --disableFastRender
|
||||
|
||||
@ -695,4 +698,4 @@ sync-deps:
|
||||
sleep-10:
|
||||
sleep 10
|
||||
|
||||
.PHONY: sync-deps sleep-10 proxy-dashboard proxy-prometheus proxy-grafana clean clean-toolchain clean-binaries clean-protos presubmit test test-10 vet
|
||||
.PHONY: deploy-redirect-site sync-deps sleep-10 proxy-dashboard proxy-prometheus proxy-grafana clean clean-toolchain clean-binaries clean-protos presubmit test test-10 vet
|
||||
|
25
site/redirect/.gcloudignore
Normal file
25
site/redirect/.gcloudignore
Normal file
@ -0,0 +1,25 @@
|
||||
# This file specifies files that are *not* uploaded to Google Cloud Platform
|
||||
# using gcloud. It follows the same syntax as .gitignore, with the addition of
|
||||
# "#!include" directives (which insert the entries of the given .gitignore-style
|
||||
# file at that point).
|
||||
#
|
||||
# For more information, run:
|
||||
# $ gcloud topic gcloudignore
|
||||
#
|
||||
.gcloudignore
|
||||
# If you would like to upload your .git directory, .gitignore file or files
|
||||
# from your .gitignore file, remove the corresponding line
|
||||
# below:
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
21
site/redirect/app.yaml
Normal file
21
site/redirect/app.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
# Copyright 2018 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
runtime: go111
|
||||
service: default
|
||||
|
||||
handlers:
|
||||
- url: /.*
|
||||
secure: always
|
||||
script: auto
|
16
site/redirect/redirect.go
Normal file
16
site/redirect/redirect.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"google.golang.org/appengine"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/", redirect)
|
||||
appengine.Main()
|
||||
}
|
||||
|
||||
func redirect(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "https://github.com/GoogleCloudPlatform/open-match/", 301)
|
||||
}
|
Reference in New Issue
Block a user