Skip to content

Commit 50b7fc0

Browse files
committed
Add devcontainer and process-compose files
1 parent 56bd036 commit 50b7fc0

File tree

4 files changed

+88
-0
lines changed

4 files changed

+88
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM jetpackio/devbox:latest
2+
3+
# Installing your devbox project
4+
WORKDIR /code
5+
USER root:root
6+
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code
7+
USER ${DEVBOX_USER}:${DEVBOX_USER}
8+
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json
9+
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock
10+
11+
12+
13+
RUN devbox run -- echo "Installed Packages." && nix-store --gc && nix-store --optimise
14+
15+
RUN devbox shellenv --init-hook >> ~/.profile

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Devbox Remote Container",
3+
"build": {
4+
"dockerfile": "./Dockerfile",
5+
"context": ".."
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {},
10+
"extensions": [
11+
"jetpack-io.devbox"
12+
]
13+
}
14+
},
15+
"remoteUser": "devbox"
16+
}

bin/devbox-init-hook

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# This is an example of a custom devbox init hook.
6+
# It is for commands you want to run every time you enter the devbox shell.
7+
# For example, you might want to disable tools like mise, nodenv, etc.
8+
# (Since these might interfere with the devbox environment)
9+
10+
# IMPORTANT: don't use this script for environment variables; use .env instead.
11+
12+
# e.g. disable mise in devbox shell
13+
command -v mise >/dev/null && mise --quiet deactivate || true
14+

process-compose.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: "0.5"
2+
3+
processes:
4+
firebase-emulators:
5+
description: This process runs the local firebase emulators used in the project.
6+
command: firebase emulators:start --project demo-bdt-dev --only auth,storage,firestore
7+
ready_log_line: "All emulators ready!"
8+
builder-api:
9+
description: This process runs the builder-api in dev mode on port ${QUARKUS_HTTP_PORT}.
10+
command: quarkus dev
11+
working_dir: builder-api/
12+
environment:
13+
- "QUARKUS_HTTP_PORT=8081"
14+
- "QUARKUS_CONSOLE_COLOR=true"
15+
ready_log_line: "Listening on: http://localhost:8081"
16+
depends_on:
17+
firebase-emulators:
18+
condition: process_log_ready
19+
builder-frontend:
20+
description: This process runs the builder-frontend in dev mode.
21+
command: npm run dev -- --host
22+
working_dir: builder-frontend/
23+
depends_on:
24+
builder-api:
25+
condition: process_log_ready
26+
screener-api:
27+
description: This process runs the screener-api in dev mode on port ${QUARKUS_HTTP_PORT}.
28+
command: quarkus dev
29+
working_dir: screener-api/
30+
environment:
31+
- "QUARKUS_HTTP_PORT=8082"
32+
- "QUARKUS_CONSOLE_COLOR=true"
33+
ready_log_line: "Listening on: http://localhost:8082"
34+
depends_on:
35+
firebase-emulators:
36+
condition: process_log_ready
37+
screener-frontend:
38+
description: This process runs the screener-frontend in dev mode.
39+
command: npm run dev -- --host
40+
working_dir: screener-frontend/
41+
depends_on:
42+
screener-api:
43+
condition: process_log_ready

0 commit comments

Comments
 (0)