Skip to content

Commit

Permalink
Revert "build website docker image; a few build refactors"
Browse files Browse the repository at this point in the history
This reverts commit dedcdeb.
  • Loading branch information
erosson committed May 27, 2024
1 parent ccefbea commit cdaaa7a
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 162 deletions.
9 changes: 4 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:0-20",
"features": {
"ghcr.io/devcontainers/features/ruby:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
"ghcr.io/devcontainers/features/ruby:1": {}
},
"customizations": {
"vscode": {
Expand All @@ -26,8 +25,8 @@
"onAutoForward": "ignore"
}
},
"postCreateCommand": ".devcontainer/post-create-command"
// "postStartCommand": "yarn start"
"postCreateCommand": ".devcontainer/post-create-command",
"postStartCommand": "yarn start",
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
20 changes: 18 additions & 2 deletions .devcontainer/post-create-command
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/bin/bash
set -eux
cd "`dirname "$0"`"
./setup/rvm.sh

# installing compass is a huge pain, but replacing it is a huger pain.
RUBY_VERSION=ruby-2.5
rvm install $RUBY_VERSION

# rvm use --default ruby-2.5 # NOPE, not in shell scripts
# https://rvm.io/rvm/basics
# https://stackoverflow.com/questions/10632066/cant-change-rvm-default
source $(rvm $RUBY_VERSION do rvm env --path)
rvm alias delete default
rvm alias create default $RUBY_VERSION

gem install compass

ruby --version
compass --version

# finally done with ruby
yarn install
18 changes: 0 additions & 18 deletions .devcontainer/setup/rvm.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/build-docker-image.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tasks:
- init: yarn
command: |
.devcontainer/post-create-command
yarn start
ports:
- port: 9000
onOpen: open-preview

vscode:
extensions:
- esbenp.prettier-vscode
41 changes: 0 additions & 41 deletions Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions docker-compose.yml

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"license": "GPL-3.0",
"scripts": {
"install:link": "(cd tables && yarn link) && (cd swarmsim-ts && yarn link && yarn link @swarmsim/tables) && (cd swarmsim-coffee && yarn link @swarmsim/tables && yarn link @swarmsim/ts)",
"install": "yarn run install:link && (cd tables && yarn install) && (cd swarmsim-ts && yarn install) && (cd swarmsim-coffee && yarn install)",
"start": "(cd tables && yarn build) && (cd swarmsim-ts && yarn build) && concurrently -k 'cd swarmsim-coffee && yarn start' 'cd swarmsim-ts && yarn watch'",
"build": "(cd tables && yarn build) && (cd swarmsim-ts && yarn build) && (cd swarmsim-coffee && yarn _build && cp -rp dist ..)",
"install": "yarn run install:link && (cd tables && yarn install && yarn build) && (cd swarmsim-ts && yarn install && yarn build) && (cd swarmsim-coffee && yarn install)",
"start": "concurrently -k 'cd swarmsim-coffee && yarn start' 'cd swarmsim-ts && yarn watch'",
"build": "(cd tables && yarn build) && (cd swarmsim-ts && yarn build) && (cd swarmsim-coffee && yarn build && cp -rp dist ..)",
"start:dist": "serve dist",
"test": "(cd tables && yarn test) && (cd swarmsim-ts && yarn test) && (cd swarmsim-coffee && yarn test)"
},
Expand Down
5 changes: 2 additions & 3 deletions swarmsim-coffee/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@
"tf:apply": "set -a && . ~/.cloudflare.env && set +a && terraform apply -auto-approve",
"start": "grunt serve",
"start:dist": "cd dist && serve",
"// build": "openssl_conf export: https://github.com/bazelbuild/rules_closure/issues/351#issuecomment-854628326",
"build": "yarn test && yarn _build",
"_build": "grunt build && yarn _build:ts",
"_build:ts": "rm -rf ./dist/swarmsim-ts && cp -rp ./node_modules/@swarmsim/ts/dist/coffee-embed ./dist/swarmsim-ts",
"preversion": "yarn test",
"_pretest": "grunt pretest",
"test:unit": "OPENSSL_CONF=/dev/null karma start test/karma-unit.conf.coffee --singleRun",
"test:integration": "OPENSSL_CONF=/dev/null karma start test/karma-integration.conf.coffee --singleRun",
"test:unit": "karma start test/karma-unit.conf.coffee --singleRun",
"test:integration": "karma start test/karma-integration.conf.coffee --singleRun",
"test": "yarn _pretest && yarn test:unit && yarn test:integration"
}
}

0 comments on commit cdaaa7a

Please sign in to comment.