Skip to content

Commit

Permalink
containers
Browse files Browse the repository at this point in the history
  • Loading branch information
st3phhays committed May 16, 2024
1 parent c21f1ab commit 7dd77ef
Show file tree
Hide file tree
Showing 6 changed files with 164 additions and 109 deletions.
42 changes: 42 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/withastro/astro/blob/main/.devcontainer/with-mdx/devcontainer.json
{
"name": "Astro",

"build": {
"dockerfile": "../Dockerfile"
},

"portsAttributes": {
"5086": {
"label": "Application",
"onAutoForward": "openPreview"
}
},

"forwardPorts": [5086],

"postAttachCommand": "yarn dev",

"customizations": {
"codespaces": {
"openFiles": ["README.md"]
},
"vscode": {
"extensions": [
"ms-dotnettools.csharp",
"DavidAnson.vscode-markdownlint",
"shardulm94.trailing-spaces",
"nhoizey.gremlins",
"streetsidesoftware.code-spell-checker",
"bierner.emojisense",
"astro-build.astro-vscode",
"esbenp.prettier-vscode",
"unifiedjs.vscode-mdx",
"ms-vscode.vscode-typescript-next",
"dbaeumer.vscode-eslint"
]
}
},
"remoteUser": "node"
}
2 changes: 0 additions & 2 deletions .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: yarn install --immutable
- name: Build site
run: yarn build
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:lts
WORKDIR /app

COPY package.json yarn.lock ./

COPY . .

RUN corepack enable

EXPOSE 5086

CMD [ "yarn", "dev" ]
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default defineConfig({
site: 'https://docs.chocolatey.org',
// trailingSlash: 'always',
server: {
port: 5086
port: 5086,
host: true
},
markdown: {
syntaxHighlight: false, // Temporarily disable syntax highlighting and rely on Prism.js via choco-theme
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "yarn choco-theme && npx astro dev",
"start": "npx astro dev",
"build": "yarn choco-theme && npx astro check && npx astro build",
"dev": "yarn dependencies && yarn telemetry && yarn choco-theme && npx astro dev",
"start": "yarn dev",
"build": "yarn dependencies && yarn telemetry && yarn choco-theme && npx astro check && npx astro build",
"preview": "npx astro preview",
"astro": "npx astro",
"telemetry": "npx astro telemetry disable",
"dependencies": "yarn install --immutable",
"choco-theme": "npx --quiet ts-node --skipIgnore node_modules/choco-theme/build/choco-theme.ts --repository=docs"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 7dd77ef

Please sign in to comment.