diff --git a/cobalt/site/deploy/app.yaml b/cobalt/site/deploy/app.yaml index 409977792df7..d91cbd542b87 100644 --- a/cobalt/site/deploy/app.yaml +++ b/cobalt/site/deploy/app.yaml @@ -1,3 +1,4 @@ +service: staging runtime: python27 api_version: 1 threadsafe: true diff --git a/docker/docsite/Dockerfile b/docker/docsite/Dockerfile index 7dbadc1649fd..252515b603e3 100644 --- a/docker/docsite/Dockerfile +++ b/docker/docsite/Dockerfile @@ -25,4 +25,4 @@ RUN addgroup --group --gid "${GID}" defaultgroup \ USER defaultuser -CMD /code/third_party/repo-publishing-toolkit-local/preview-site.sh +CMD /cobalt/third_party/repo-publishing-toolkit-local/preview-site.sh diff --git a/docker/docsite/README.md b/docker/docsite/README.md index e3204cef1b31..2ceb6c97a0ff 100644 --- a/docker/docsite/README.md +++ b/docker/docsite/README.md @@ -1,7 +1,22 @@ -# How It Works -A Docker container will be launched that will update the cobalt.dev source files -in the Cobalt repository specified by `$COBALT_SRC`, which must be set, and it -will locally host the updated cobalt.dev on port `4000`. +# How To Use +A docker container will be launched that will update the cobalt.dev source files +in the Cobalt repository specified by the environment variable `COBALT_SRC` or +the current working directory, which should be the root of the Cobalt +repository, if that environment variable is not set. + +When the `docsite` service is run, the container will then host the updated +cobalt.dev site locally on port `4000`. + +When the `docsite-build-only` service is run, the container will build and +output the site content in the directory `out/deploy/www` at the root of the +Cobalt directory, and copy the app.yaml deployable into `out/deploy`. + +# How To Run +docker-compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g) SERVICE + +docker-compose up SERVICE + +# Notes A separate docker-compose.yml was created due to the root docker-compose.yml being unable to locate the Gemfile in the Docker build context. @@ -11,8 +26,11 @@ we need to run `bundle install` with elevated permissions but if we let the `preview-site.sh`, which normally installs gems, run with elevated permissions the resulting files added or modified would not be accessible to the user who ran the Docker container. +<<<<<<< HEAD (6a4768 [PS4] Add logs to debug gpu crash) # How To Run docker-compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g) docsite docker-compose up docsite +======= +>>>>>>> CHANGE (266712 Update Docker docsite tooling to generate deploy directory.) diff --git a/docker/docsite/docker-compose.yml b/docker/docsite/docker-compose.yml index 66c89020170a..26ed83fcd7b5 100644 --- a/docker/docsite/docker-compose.yml +++ b/docker/docsite/docker-compose.yml @@ -9,4 +9,14 @@ services: ports: - "4000:4000" volumes: - - ${COBALT_SRC:-.}:/code/ + # We use ../../ when the environment variable COBALT_SRC is not set since + # this file is located two directories under the root of the repository. + - ${COBALT_SRC:-../../}:/cobalt/ + docsite-build-only: + container_name: docsite-build-only + environment: + # SITE_DST specifies where the files required to deploy the site should be + # placed, and by default this is under the "out" directory. + - SITE_DST=/cobalt/out/deploy/www + extends: + service: docsite