Skip to content

Commit 4d57774

Browse files
authored
Improve local development (circleci#5601)
* Improve local development with reverse proxy * upgrade html-proofer
1 parent 4b2475b commit 4d57774

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

Caddyfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ui.circleci.com
2+
3+
reverse_proxy host.docker.internal:4000
4+
tls internal

Gemfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ GEM
4545
minitest (>= 5.1)
4646
tzinfo (~> 2.0)
4747
zeitwerk (~> 2.3)
48-
addressable (2.7.0)
48+
addressable (2.8.0)
4949
public_suffix (>= 2.0.2, < 5.0)
5050
algolia_html_extractor (2.6.4)
5151
json (~> 2.0)
@@ -60,8 +60,8 @@ GEM
6060
em-websocket (0.5.2)
6161
eventmachine (>= 0.12.9)
6262
http_parser.rb (~> 0.6.0)
63-
ethon (0.12.0)
64-
ffi (>= 1.3.0)
63+
ethon (0.14.0)
64+
ffi (>= 1.15.0)
6565
eventmachine (1.2.7)
6666
execjs (2.7.0)
6767
extras (0.3.0)
@@ -72,13 +72,13 @@ GEM
7272
ruby2_keywords
7373
faraday-net_http (1.0.1)
7474
fastimage (2.2.3)
75-
ffi (1.15.1)
75+
ffi (1.15.3)
7676
filesize (0.2.0)
7777
forwardable-extended (2.6.0)
7878
gitlab (4.8.0)
7979
httparty (>= 0.14.0)
8080
terminal-table (>= 1.5.1)
81-
html-proofer (3.18.8)
81+
html-proofer (3.19.2)
8282
addressable (~> 2.3)
8383
mercenary (~> 0.3)
8484
nokogumbo (~> 2.0)
@@ -140,15 +140,15 @@ GEM
140140
mime-types (3.3.1)
141141
mime-types-data (~> 3.2015)
142142
mime-types-data (3.2021.0225)
143-
mini_portile2 (2.5.0)
143+
mini_portile2 (2.6.1)
144144
minitest (5.14.4)
145145
multi_json (1.15.0)
146146
multi_xml (0.6.0)
147147
multipart-post (2.1.1)
148-
nokogiri (1.11.2)
149-
mini_portile2 (~> 2.5.0)
148+
nokogiri (1.12.3)
149+
mini_portile2 (~> 2.6.1)
150150
racc (~> 1.4)
151-
nokogumbo (2.0.4)
151+
nokogumbo (2.0.5)
152152
nokogiri (~> 1.8, >= 1.8.4)
153153
octokit (4.20.0)
154154
faraday (>= 0.9)

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ services:
99
ports:
1010
- 127.0.0.1:4000:4000
1111
- 127.0.0.1:35729:35729
12+
https:
13+
image: "caddy:2"
14+
ports:
15+
- '127.0.0.1:443:443'
16+
volumes:
17+
- "./Caddyfile:/etc/caddy/Caddyfile"

docs/local-development.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ There are two ways to work on CircleCI docs locally: with Docker and with [Ruby]
66
## 1. Local Development with Docker (recommended)
77

88
1. Install Docker for your platform: <https://docs.docker.com/engine/install/>
9-
1. Clone the CircleCI docs repo: `git clone --recurse-submodules https://github.com/circleci/circleci-docs.git`
9+
2. Clone the CircleCI docs repo: `git clone --recurse-submodules https://github.com/circleci/circleci-docs.git`
1010
_(If you already cloned the project and forgot `--recurse-submodules`, run `git submodule update --init`)_
11-
1. Run `npm install` to fetch dependencies
12-
1. Run `npm run webpack-dev` to create needed js assets
13-
1. Run `docker-compose up`
14-
1. The docs site will now be running on <http://localhost:4000/docs/>
11+
3. Run `npm install` to fetch dependencies
12+
4. Run `npm run webpack-dev` to create needed js assets
13+
5. Add the following line to your `/etc/hosts` file:
14+
```bash
15+
127.0.0.1 ui.circleci.com
16+
```
17+
6. Run `docker-compose up` (Warning: This may take up to 10 minutes to build)
18+
7. The docs site will now be running on <https://ui.circleci.com/docs/>. If the browser presents to you an HSTS Security Warning, you can safely bypass it as it is an expected outcome of running the Caddy Reverse Proxy in Docker.
1519

1620
**Note:** If you want to submit a pull request to update the docs, you'll need to [make a fork](https://github.com/circleci/circleci-docs#fork-destination-box) of this repo and clone your version in step 2 above. Then when you push your changes to your fork you can submit a pull request to us.
1721

jekyll/assets/js/site.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)