Skip to content
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 .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "Astro Starlight Dev",
"dockerComposeFile": "./docker-compose.yml",
"service": "astro-dev",
"service": "df-astro-dev",
"workspaceFolder": "/site",
"workspaceMount": "source=${localWorkspaceFolder},target=/site,type=bind",
"forwardPorts": [4321],
"forwardPorts": [4322],
"postStartCommand": "npm run dev",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
Expand Down
11 changes: 7 additions & 4 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
services:
astro-dev:
df-astro-dev:
build:
context: ../
dockerfile: Dockerfile
ports:
- "4321:4321"
- "4322:4322"
volumes:
- ..:/site
- astro-node_modules:/site/node_modules
- df-astro-node_modules:/site/node_modules
tty: true
stdin_open: true
command: sleep infinity
volumes:
astro-node_modules:
df-astro-node_modules:
6 changes: 0 additions & 6 deletions .devcontainer/package-lock.json

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
run: npm run format:check
- name: Vale
run: |
sudo apt update
sudo apt install snapd
sudo snap install vale --edge
curl -L -o vale.tar.gz "https://github.com/errata-ai/vale/releases/download/v3.13.0/vale_3.13.0_Linux_64-bit.tar.gz"
tar -xzf vale.tar.gz
sudo mv vale /usr/local/bin/vale
rm vale.tar.gz
vale --version
npm run prose:check
24 changes: 19 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,31 @@ WORKDIR /site

COPY package*.json /site/

RUN apt-get update && apt-get upgrade
RUN apt-get update && apt-get upgrade -y
RUN apt-get install git curl -y

RUN npm install
RUN npm run build

RUN set -eux; \
ARCH=$(uname -m); \
if [ "$ARCH" = "x86_64" ]; then \
VALE_ARCH="64-bit"; \
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \
VALE_ARCH="arm64"; \
else \
echo "Unsupported architecture: $ARCH"; exit 1; \
fi; \
curl -L -o vale.tar.gz "https://github.com/errata-ai/vale/releases/download/v3.13.0/vale_3.13.0_Linux_${VALE_ARCH}.tar.gz"; \
tar -xzf vale.tar.gz; \
mv vale /usr/local/bin/vale; \
rm vale.tar.gz; \
vale --version

ENV HOST=0.0.0.0
ENV PORT=4321
ENV PORT=4322

# Expose the dev server port
EXPOSE 4321
EXPOSE 4322

# Start the dev server
CMD ["npm", "run", "dev"]
# CMD ["npm", "run", "dev"]
Loading
Loading