Skip to content

Commit c2dac8f

Browse files
committed
Merge branch 'master' of github.com:google/osv.dev into feat-gitter
2 parents b016142 + b859ff4 commit c2dac8f

26 files changed

Lines changed: 335 additions & 230 deletions

File tree

deployment/clouddeploy/gke-workers/base/gitter.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ spec:
3232
env:
3333
- name: GOMEMLIMIT
3434
value: "100GiB"
35+
- name: LOG_LEVEL
36+
value: "debug"
3537
volumeMounts:
3638
- mountPath: /work
3739
name: disk-data

deployment/terraform/modules/osv/scripts/gcloud_build_image

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ tempdir="$(mktemp -d /tmp/docker.XXXXXX)"
102102
cd "${tempdir}"
103103

104104
# Be careful about exposing the access token.
105-
access_token="$(gcloud auth print-access-token)"
105+
access_token="$(gcloud auth application-default print-access-token)"
106106
curl --fail -o "service.json" -H @- \
107107
"https://servicemanagement.googleapis.com/v1/services/${SERVICE}/configs/${CONFIG_ID}?view=FULL" <<EOF || error_exit "Failed to download service config"
108108
Authorization: Bearer ${access_token}

docs/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ GEM
235235
minitest (5.27.0)
236236
net-http (0.9.1)
237237
uri (>= 0.11.1)
238-
nokogiri (1.18.10-x86_64-linux-gnu)
238+
nokogiri (1.19.1-x86_64-linux-gnu)
239239
racc (~> 1.4)
240240
octokit (4.25.1)
241241
faraday (>= 1, < 3)

docs/README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1-
# OpenAPI generation
1+
# README
22

3-
## Prerequisites
3+
The [OSV.dev docs](https://osv.dev/docs) are hosted on [GitHub Pages](https://pages.github.com/).
4+
5+
## Running docs locally (docker)
6+
7+
You can run the docs locally consistently through docker. From the `docs` directory, run:
8+
9+
```bash
10+
docker build -t osvdev-docs -f docs.Dockerfile .
11+
docker run -p 4000:4000 osvdev-docs
12+
```
13+
14+
## Running docs locally (native)
15+
16+
To run the docs locally:
17+
18+
- Install `ruby (>= 3.1.0)`. This should come with `bundler`.
19+
- On Debian, you need to install them separately:
20+
- `ruby`
21+
- `ruby-bundler`
22+
- In this directory:
23+
- `bundle install`
24+
- `bundle exec jekyll serve`
25+
26+
Here's the full documentation on GitHub for [running Jekyll locally].
27+
28+
[running Jekyll locally]: https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll#building-your-site-locally
29+
30+
## OpenAPI generation
31+
32+
### Prerequisites
433

534
Install `protoc` for your platform:
635

@@ -28,8 +57,8 @@ To install the protobuf service converter, run:
2857
go mod download
2958
```
3059

31-
## Generation
60+
### Generation
3261

33-
```
62+
```bash
3463
python3 ./build_swagger.py
3564
```

docs/docs.Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use an official Ruby runtime as a parent image.
2+
FROM ruby:3
3+
4+
# Set the working directory in the container.
5+
WORKDIR /usr/src/app
6+
7+
# Copy the Gemfile and Gemfile.lock, and the bundle config.
8+
# This is done first to leverage Docker's layer caching.
9+
COPY ./Gemfile* ./
10+
11+
# Install the dependencies.
12+
RUN bundle install
13+
14+
# Copy the rest of the documentation files.
15+
COPY ./ ./
16+
17+
# Expose port 4000 for the Jekyll server.
18+
EXPOSE 4000
19+
20+
# The command to run when the container starts.
21+
# --host 0.0.0.0 is important to make the server accessible from outside the container.
22+
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"]

gcp/website/frontend3/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gcp/website/frontend3/src/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,7 @@ dl.vulnerability-details,
894894
padding: 0;
895895
font-family: $osv-heading-font-family;
896896
font-size: 14px;
897+
overflow-wrap: anywhere;
897898
}
898899
}
899900

gcp/website/frontend3/webpack.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
vendorsJs: {
2525
test: /node_modules/,
2626
chunks: 'initial',
27-
filename: 'static/vendors.js',
27+
name: 'vendors',
2828
priority: 1,
2929
maxInitialRequests: 2,
3030
minChunks: 1,

gcp/website/frontend3/webpack.prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
vendorsJs: {
2525
test: /node_modules/,
2626
chunks: 'initial',
27-
filename: 'static/vendors.[contenthash].js',
27+
name: 'vendors',
2828
priority: 1,
2929
maxInitialRequests: 2,
3030
minChunks: 1,

gcp/website/frontend_handlers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ def docs():
220220

221221
@blueprint.route('/linter', strict_slashes=False)
222222
def linter():
223+
if request.host_url == 'osv.dev':
224+
return redirect(request.url.replace('osv.dev', 'test.osv.dev'), code=302)
223225
return render_template('linter.html')
224226

225227

0 commit comments

Comments
 (0)