Skip to content

sndev runs on codespaces #2214

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

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

axelvyrn
Copy link

@axelvyrn axelvyrn commented Jun 8, 2025

Description

Closes #2209
Github Codespaces uses docker to run the platform like sndev. So this was a docker-in-docker error. Thus it was required to check explicitly if Docker was available in the codespaces.

Steps to run sndev on Github Codespaces:

  1. run npm install. let it be finished
  2. in .env set
CPU_SHARES_IMPORTANT=1024
CPU_SHARES_MODERATE=512
CPU_SHARES_LOW=256

because when I ran docker ps -a && docker-compose ps && ./sndev status
it returned

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
WARN[0000] The "CPU_SHARES_LOW" variable is not set. Defaulting to a blank string. 
error while interpolating services.opensearch.cpu_shares: failed to cast to expected type: strconv.ParseInt: parsing "": invalid syntax

because opensearch was not able to run as a healthy container

  1. export all variables explicitly (must)
export $(grep -v '^#' .env.development | xargs)
  1. run ./sndev start. let it build and deploy the container, you should be able to see the containers icon appear in the sidebar

image

  1. wait for about 5 minutes or split terminal and/or check sndev status.

  2. go to PORTS and open port 3000 on the web browser through the link from github codespaces (the browser icon that appears when you hover over port 3000) not from http://localhost:3000

  3. you will be able to see the live site on the page

Screenshots

Image

Image

Additional Context

Make sure the codespaces machine is the 8GB RAM and 32 GB storage one because running sndev puts great load on the CPU

Checklist

Are your changes backwards compatible? Please answer below:
yup

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
10

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
yes

Did you introduce any new environment variables? If so, call them out explicitly here:

CPU_SHARES_IMPORTANT=1024
CPU_SHARES_MODERATE=512
CPU_SHARES_LOW=256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make sndev work in github codespaces
2 participants