Skip to content

Commit

Permalink
chore(devcontainer): moving commands to script
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrest4647 committed Oct 19, 2023
1 parent 437025a commit e3b5da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// "shutdownAction": "none",
// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "",
"postAttachCommand": "bundle install && (bundle exec rails s -p 3000 -b 0.0.0.0 & bundle exec rails db:prepare)",
"postAttachCommand": "./.devcontainer/script.sh",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
Expand Down
5 changes: 2 additions & 3 deletions .devcontainer/script.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bin/rails db:prepare

gh codespace ports visibility 3000:public 3035:public
bundle install && \
bundle exec rails s -p 3000 -b 0.0.0.0 & bundle exec rails db:prepare

0 comments on commit e3b5da5

Please sign in to comment.