-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #2792 Set up Docusaurus as a Microservice #2794
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These eslint errors will require you to add a new section to our .eslintrc.js
file in the root under the overrides
section that defines what to do for src/api/docs/**/*.js
. Use the src/web
or src/api/status
as an example.
aa48668
to
984b488
Compare
984b488
to
f547430
Compare
f547430
to
9fd7efe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also change the routing to /docs
, so you'd go to telescope.cdot.systems/docs
to see all this.
This is exciting to see happening.
9fd7efe
to
aae88be
Compare
0aa8b3b
to
6a97084
Compare
6a97084
to
db22817
Compare
db22817
to
09aa1e1
Compare
09aa1e1
to
a543794
Compare
@cindyledev can I help you somehow ? |
Should we add |
a74bcda
to
6da79bc
Compare
docker/docker-compose.yml
Outdated
- DOCS_URL | ||
depends_on: | ||
- traefik | ||
labels: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this with nginx, we can drop all this, and have docs
depend only on nginx
.
src/docs/Dockerfile
Outdated
FROM nginx:stable as deploy | ||
# https://github.com/krallin/tini | ||
RUN apk --no-cache add tini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having problems building the docker container through pnpm run services:start
.
I am not very familiar with docker
, but I think these are the problematic parts. The deploy
image we are using uses debian
instead of alpine
, which makes the line RUN apk ...
to fail: apk
does not exist. I tried to change it to apt-get install tini
, but the package cannot be found (despite the tini
GitHub repo saying otherwise...).
Maybe we could use an alpine
image when building everything, and then place the nginx
image right before the COPY
ing step, just like we do in src/web/Dockerfile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need tini
at all, we can get rid of this completely, since we aren't actually running a process. tini
is for running the node process in a container. In this case, we build the site with node, then copy the results into the nginx container's filesystem where it expects to find it.
We could change nginx:stable
to nginx:stable-alpine
though, to save some size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did Dave review this in the Docker/Nginx meeting on Feb 4th? I'm so sad I missed it and I'm even more sad that no one recorded it! :( I copied and pasted some stuff from our /src/web/Dockerfile hence the
|
…raefik, update yarn to pnpm in readme
fab75eb
to
ebf6627
Compare
Steps to test the Docusarus website Docker container
|
Wow apparently my PR is so bad that CI checks don't even wanna run tests for it =_= |
@cindyledev this PR is pretty big, and I'm not 100% if you're ready for review? Let me know what help you need/want and when. |
I wonder if we can break down the PR so that it is easier for reviewing? In the issue #2792, I was expecting just Docusaurus to be installed in the project, and then later address the dockerization in a future issue/PR. If that's not an option, then @cindyledev, would you accept if we make a PR on your branch? That way, we won't have to throw away the work you did. |
I will slim down this PR tomorrow because you're right, this PR is supposed to "Set up Docusaurus", I went too far out of scope which made it extremely difficult to review. |
Thank you everyone for your feedback here. Closing this one in favour of #2853. Follow up issues will be filed later |
Issue This PR Addresses
Fixes #2792
Fixes #2746
Fixes #290
Type of Change
Description
This sets up Docusaurus in a Docker container that runs locally on port 4631.
So far, I only have the Docusaurus website running in a Docker container. To test the container:
git remote add cindyledev https://github.com/cindyledev/telescope.git
git fetch cindyledev
git checkout docusaurus
cd src/docs
docker build --target development -t docs:dev .
docker run -p 4631:4631 docs:dev
TODO
Nginx stuff
How to test this PR
git remote add cindyledev https://github.com/cindyledev/telescope.git
git fetch cindyledev
git checkout docusaurus
pnpm install
pnpm services:start
Go to localhost:4631 to see the Docusaurus website.
Steps to test the PR
Checklist