Skip to content

Commit a0b09eb

Browse files
committed
devspace setup
1 parent 7552ba6 commit a0b09eb

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

.devcontainer/local/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM 916869144969.dkr.ecr.us-east-1.amazonaws.com/customink/ruby:noble-3.2
2+
WORKDIR /workspaces/vertex_client
3+
USER root

.devcontainer/local/devcontainer.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "vertex_client",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "vertex_client",
5+
"workspaceFolder": "/workspaces/vertex_client",
6+
"features": {
7+
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
8+
"packages": "vim,iputils-ping,iputils-tracepath,zsh,ssh,tmux"
9+
},
10+
"ghcr.io/devcontainers/features/common-utils": {
11+
"upgradePackages": false
12+
}
13+
}
14+
}
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Change whatever you need also you can run dev-lint to check some fundamentals are still working
2+
name: vertex_client
3+
services:
4+
vertex_client:
5+
build:
6+
context: ../../
7+
dockerfile: .devcontainer/local/Dockerfile
8+
command: sleep infinity
9+
dns:
10+
- 172.24.0.250
11+
volumes:
12+
- ../..:/workspaces/vertex_client
13+
- vertex_client-gems:/workspaces/vertex_client/.bundle
14+
- /var/run/docker.sock:/var/run/docker.sock
15+
- /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock
16+
environment:
17+
# The .env(*) files in your project folder override these variables
18+
# you can comment out the .env files, move the configuration here
19+
# mount over the .env files in volume section, depends on what workflow
20+
# you want
21+
DEVSPACE: true # useful for disabling some stuff in bin/setup and bin/boostrap and similar init scripts
22+
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
23+
BUNDLE_PATH: /workspaces/vertex_client/.bundle
24+
GEM_PATH: /workspaces/vertex_client/.bundle/ruby/2.1.0/gems
25+
GEM_HOME: /workspaces/vertex_client/.bundle/ruby/2.1.0/gems
26+
DISPLAY: xserver:0
27+
env_file:
28+
- ${HOME}/.devcontainers.env
29+
labels:
30+
# See https://doc.traefik.io/traefik/routing/providers/docker/#tcp-routers
31+
# See https://doc.traefik.io/traefik/routing/providers/docker/#services
32+
- "traefik.http.routers.vertex_client-http.rule=Host(`vertex_client.customink.d3v`)"
33+
- "traefik.http.routers.vertex_client-http.entrypoints=web"
34+
- "traefik.http.routers.vertex_client-http.service=vertex_client-http"
35+
36+
- "traefik.http.routers.vertex_client-https.rule=Host(`vertex_client.customink.d3v`)"
37+
- "traefik.http.routers.vertex_client-https.entrypoints=websecure"
38+
- "traefik.http.routers.vertex_client-https.tls=true"
39+
- "traefik.http.routers.vertex_client-https.service=vertex_client-http"
40+
41+
- "traefik.http.services.vertex_client-http.loadbalancer.server.port=3000"
42+
volumes:
43+
vertex_client-gems:
44+
networks:
45+
default:
46+
external: true
47+
name: devcontainers

bin/bootstrap

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
set -e
77

8+
if [ -n "$DEVSPACE" ]; then
9+
echo "==> Running in devspace context, skipping bootstrap"
10+
exit 0
11+
fi
12+
813
cd "$(dirname "$0")/.."
914

1015
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then

bin/setup

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
set -e
33
cd "$(dirname "$0")/.."
44

5-
bundle --quiet
5+
bundle
66

0 commit comments

Comments
 (0)