Skip to content

Commit

Permalink
Add CodeSandbox support
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Aug 30, 2024
1 parent e32118a commit 44d33be
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "npm install"
}
],

// These tasks can be run from CodeSandbox. Running one will open a log in the app.
"tasks": {
"start": {
"name": "dev",
"command": "npm run dev -- --baseURL=/ --appendPort=false --liveReloadPort=443 --bind=0.0.0.0",
"runAtStart": true
},
"install": {
"name": "install dependencies",
"command": "npm install"
}
}
}
19 changes: 19 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04

RUN apt-get update && \
apt-get install -y \
ca-certificates \
nodejs \
npm \
wget && \
update-ca-certificates

ARG HUGO_VERSION="0.131.0"
RUN wget --quiet "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" && \
tar xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \
rm -r hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \
mv hugo /usr/bin && \
chmod 755 /usr/bin/hugo

WORKDIR /src
COPY ./ /src
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"build": {
"dockerfile": "./Dockerfile"
}
}

0 comments on commit 44d33be

Please sign in to comment.