Skip to content

Commit

Permalink
Merge pull request #112 from GiganticMinecraft/fix/redocly
Browse files Browse the repository at this point in the history
chore: Redoclyのコンテナが動かない不具合を修正
  • Loading branch information
rito528 authored Sep 17, 2023
2 parents 287c70d + e3e9a7f commit 4070a5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
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

0 comments on commit 4070a5e

Please sign in to comment.