Skip to content
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

chore: Redoclyのコンテナが動かない不具合を修正 #112

Merged
merged 2 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ services:
restart: always
redocly:
build:
context: ./docker
dockerfile: Dockerfile
context: .
dockerfile: ./docker/Dockerfile
container_name: redocly
ports:
- 127.0.0.1:8082:8080
Expand Down
10 changes: 8 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ENV PORT=8080

EXPOSE 8080

RUN npm install -g @redocly/cli
RUN npm install -g @redocly/cli http-server

ENTRYPOINT ["sh", "-c", "redocly preview-docs $SPEC_URL --port $PORT --host 0.0.0.0 --force"]
USER node
WORKDIR /tmp/files

COPY --chmod=554 --chown=node:node ./docker/entrypoint.sh .
COPY --chown=node:node ./.github/template.hbs .

ENTRYPOINT ["./entrypoint.sh"]
4 changes: 4 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

redocly build-docs /schema/openapi.yml -o ./docs/index.html -t ./template.hbs
http-server ./docs -p $PORT