Skip to content

Commit 6ff0e19

Browse files
author
github-actions
committed
update with project-syncing action
1 parent 5f21ee0 commit 6ff0e19

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
// Use 'postCreateCommand' to run commands after the container is created.
3939
"postCreateCommand": "bin/setup && gem install rufo && gem install htmlbeautifier",
4040

41+
// Use 'postAttachCommand' to run commands each time you attach to the container.
42+
"postAttachCommand": "bin/fix-ports",
43+
4144
// Configure tool-specific properties.
4245
"customizations": {
4346
"vscode": {

appdev.rails8.Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - \
6969
&& sudo apt-get install -y nodejs \
7070
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
7171
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
72+
# Add GitHub CLI repository
73+
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
74+
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
75+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
7276
&& sudo apt-get update \
73-
&& sudo apt-get install -y yarn \
77+
&& sudo apt-get install -y yarn gh \
7478
&& sudo npm install -g n \
7579
&& sudo n 18 \
7680
&& hash -r \

bin/fix-ports

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
# Script to fix port 502 issues
4+
5+
gh codespace ports visibility 3000:public -c $CODESPACE_NAME > /dev/null 2>&1
6+
7+
gh codespace ports visibility 3000:private -c $CODESPACE_NAME > /dev/null 2>&1
8+
9+
clear

0 commit comments

Comments
 (0)