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

Feat/393 lack of devcontainer #394

Merged
merged 3 commits into from
Dec 16, 2024
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
8 changes: 8 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Dev container - Static-Sticky",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postCreateCommand": "npm install" //gets run once after creation
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Study Association Sticky's website is a static website built in React with Gatsb

## Installation

1. Install Node Version Manager [nvm](https://github.com/creationix/nvm).
2. Install the required version of Node.JS (v13.11.0) by running `nvm install --latest-npm` in the project directory.
3. Install dependencies with `npm install`.
1. Make sure you have the [Docker engine](https://docs.docker.com/engine/), as well as [Visual studio code](https://code.visualstudio.com/) with the [Devcontainers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extention installed.
2. open the project in a dev containter. The default shortcut for this (in VS Code) is: <kbd>CTRL</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>, and then typing `open folder` in container. You may have to select the project folder. If this takes longer than expected, please read the warning below.
3. Open a terminal in the dev container. You can do this by pressing `Terminal` (in the hotbar), then `New terminal`. Alternatively, you can use the default keybinds: <kbd>CTRL</kbd>+<kbd>Shift</kbd>+<kbd>`</kbd>.
4. Create .env file: `cp sample.env .env`.
5. Fill .env with the required api keys from [contentful](https://app.contentful.com/).
Ask someone in the CommIT for the right keys to use.
Expand All @@ -18,7 +18,7 @@ If you want to watch for changes in the theme, also run `npm run watch-semantic`

If you get an error about file watchers, try this <https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers>

Then just run `npm run develop` to start a shiny development server with hot reloading.
Then just run `npm run develop` inside the devcontainer commandline to start a shiny development server with hot reloading.

## Contentful queries

Expand Down
Loading