Skip to content

Commit ed0b4a7

Browse files
Merge pull request #10 from usherlabs/devcontainer
Add devcontainer config
2 parents ae60e62 + 1863c44 commit ed0b4a7

File tree

5 files changed

+44
-1
lines changed

5 files changed

+44
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM mcr.microsoft.com/devcontainers/javascript-node:24
2+
3+
COPY --chmod=0755 entrypoint.sh /entrypoint.sh
4+
ENTRYPOINT ["/entrypoint.sh"]

.devcontainer/devcontainer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "CCXT",
3+
"dockerComposeFile": "./docker-compose.yml",
4+
"service": "ccxt",
5+
"workspaceFolder": "/home/node/ccxt",
6+
"mounts": [
7+
// Mount the SSH key for the local machine to make git fetch/push work in the container
8+
"source=${localEnv:HOME}/.ssh,target=/home/node/.ssh,type=bind,consistency=cached,readonly"
9+
],
10+
"postCreateCommand": "echo \"node: $(node --version)\" && echo \"npm: $(npm --version)\" && echo \"pnpm: $(pnpm --version)\""
11+
}

.devcontainer/docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
services:
2+
ccxt:
3+
build:
4+
context: ./
5+
dockerfile: Dockerfile
6+
container_name: ccxt-dev
7+
volumes:
8+
- ../:/home/node/ccxt:cached
9+
command: sleep infinity
10+
networks:
11+
- fiet-sandbox
12+
13+
networks:
14+
fiet-sandbox:
15+
external: true
16+
name: fiet-sandbox

.devcontainer/entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env sh
2+
set -eu
3+
4+
INSTALL_URL="http://local-ca/install.sh"
5+
6+
# Run the local CA installer, then exec the provided command.
7+
curl -fsSL --retry 60 --retry-all-errors --retry-delay 1 "$INSTALL_URL" | sh
8+
9+
exec "$@"

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ __debug*
4444
.custom_gitignore
4545

4646
# in case we link to parent bun repos.
47-
bun.lock
47+
bun.lock
48+
49+
.pnpm-store/
50+
cli/js/

0 commit comments

Comments
 (0)