forked from okteto/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run docs in docker compose (okteto#689)
* add a docker compose file to develop and run the docs on okteto
- Loading branch information
1 parent
0fd9e79
commit e3dc529
Showing
6 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
build | ||
.docusaurus | ||
.github | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
build | ||
.docusaurus | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# Dockerfile.buildkit | ||
# syntax=docker/dockerfile:1.7-labs | ||
|
||
FROM node:20 | ||
FROM node:20 as dev | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock ./ | ||
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install | ||
|
||
COPY . . | ||
COPY --exclude=nginx . . | ||
RUN --mount=type=cache,target=./node_modules/.cache/webpack yarn build | ||
|
||
FROM bitnami/nginx as prod | ||
COPY nginx/index.html /app | ||
COPY --from=dev /app/build/docs /app/docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
services: | ||
docs: | ||
build: | ||
context: . | ||
ports: | ||
- "8080:8080" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<head> | ||
<meta http-equiv='refresh' content='0; URL=/docs'> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
name: docs | ||
|
||
build: | ||
docs: | ||
dev: | ||
context: . | ||
target: dev | ||
|
||
deploy: | ||
compose: docker-compose.yaml | ||
|
||
dev: | ||
docs: | ||
image: ${OKTETO_BUILD_DOCS_IMAGE} | ||
image: ${OKTETO_BUILD_DEV_IMAGE} | ||
sync: | ||
- .:/app | ||
workdir: /app | ||
command: "yarn start" | ||
autocreate: true | ||
forward: | ||
- 8081:8080 | ||
- 8080:8080 |