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

bug/issue 164 fix markdown indention for hosting index page #169

Merged
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
68 changes: 34 additions & 34 deletions src/pages/guides/hosting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,60 +89,60 @@ These steps are based on a Greenwood application generated by `@greenwood/init`
1. Add `**/.greenwood` to _.dockerignore_
1. If using npm, make sure to mount the _.npmrc_ file in both the **deps** _and_ **build** stages, e.g.

<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">
<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">

```Dockerfile
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
--mount=type=bind,source=.npmrc,target=.npmrc \
npm ci --omit=dev
```
```Dockerfile
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
--mount=type=bind,source=.npmrc,target=.npmrc \
npm ci --omit=dev
```

</app-ctc-block>
</app-ctc-block>

<!-- prettier-ignore-end -->
<!-- prettier-ignore-end -->

1. Install the `@greenwood/cli` in the **deps** stage, e.g.

<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">
<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">

```Dockerfile
RUN npm i @greenwood/cli@latest
```
```Dockerfile
RUN npm i @greenwood/cli@latest
```

</app-ctc-block>
</app-ctc-block>

<!-- prettier-ignore-end -->
<!-- prettier-ignore-end -->

1. Copy the _.greenwood/_ directory into the container

<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">
<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">

```Dockerfile
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/public ./public
COPY --from=build /usr/src/app/.greenwood ./.greenwood
```
```Dockerfile
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/public ./public
COPY --from=build /usr/src/app/.greenwood ./.greenwood
```

</app-ctc-block>
</app-ctc-block>

<!-- prettier-ignore-end -->
<!-- prettier-ignore-end -->

1. Run the serve command

<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">
<!-- prettier-ignore-start -->
<app-ctc-block variant="snippet" heading="Dockerfile">

```Dockerfile
CMD npm run serve
```
```Dockerfile
CMD npm run serve
```

</app-ctc-block>
</app-ctc-block>

<!-- prettier-ignore-end -->
<!-- prettier-ignore-end -->

> Many self-hosting solutions support Docker, like our [demo repo](https://github.com/ProjectEvergreen/greenwood-demo-platform-fly) using [**Fly.io**](https://fly.io/).
Loading