Skip to content

Commit

Permalink
devspace setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jcain3389 committed Jan 9, 2025
1 parent 9c95fb5 commit 9a74607
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .devcontainer/local/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM 916869144969.dkr.ecr.us-east-1.amazonaws.com/customink/ruby:noble-3.2
WORKDIR /workspaces/vertex_client
USER root
14 changes: 14 additions & 0 deletions .devcontainer/local/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "vertex_client",
"dockerComposeFile": "docker-compose.yml",
"service": "vertex_client",
"workspaceFolder": "/workspaces/vertex_client",
"features": {
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
"packages": "vim,iputils-ping,iputils-tracepath,zsh,ssh,tmux"
},
"ghcr.io/devcontainers/features/common-utils": {
"upgradePackages": false
}
}
}
47 changes: 47 additions & 0 deletions .devcontainer/local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Change whatever you need also you can run dev-lint to check some fundamentals are still working
name: vertex_client
services:
vertex_client:
build:
context: ../../
dockerfile: .devcontainer/local/Dockerfile
command: sleep infinity
dns:
- 172.24.0.250
volumes:
- ../..:/workspaces/vertex_client
- vertex_client-gems:/workspaces/vertex_client/.bundle
- /var/run/docker.sock:/var/run/docker.sock
- /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock
environment:
# The .env(*) files in your project folder override these variables
# you can comment out the .env files, move the configuration here
# mount over the .env files in volume section, depends on what workflow
# you want
DEVSPACE: true # useful for disabling some stuff in bin/setup and bin/boostrap and similar init scripts
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
BUNDLE_PATH: /workspaces/vertex_client/.bundle
GEM_PATH: /workspaces/vertex_client/.bundle/ruby/2.1.0/gems
GEM_HOME: /workspaces/vertex_client/.bundle/ruby/2.1.0/gems
DISPLAY: xserver:0
env_file:
- ${HOME}/.devcontainers.env
labels:
# See https://doc.traefik.io/traefik/routing/providers/docker/#tcp-routers
# See https://doc.traefik.io/traefik/routing/providers/docker/#services
- "traefik.http.routers.vertex_client-http.rule=Host(`vertex_client.customink.d3v`)"
- "traefik.http.routers.vertex_client-http.entrypoints=web"
- "traefik.http.routers.vertex_client-http.service=vertex_client-http"

- "traefik.http.routers.vertex_client-https.rule=Host(`vertex_client.customink.d3v`)"
- "traefik.http.routers.vertex_client-https.entrypoints=websecure"
- "traefik.http.routers.vertex_client-https.tls=true"
- "traefik.http.routers.vertex_client-https.service=vertex_client-http"

- "traefik.http.services.vertex_client-http.loadbalancer.server.port=3000"
volumes:
vertex_client-gems:
networks:
default:
external: true
name: devcontainers
5 changes: 5 additions & 0 deletions bin/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

set -e

if [ -n "$DEVSPACE" ]; then
echo "==> Running in devspace context, skipping bootstrap"
exit 0
fi

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -e
cd "$(dirname "$0")/.."

bundle --quiet
bundle

0 comments on commit 9a74607

Please sign in to comment.