Skip to content

Commit b8eddf9

Browse files
committed
feat: added configs for setting up devcontainers
1 parent 5fed7cc commit b8eddf9

6 files changed

Lines changed: 75 additions & 0 deletions

File tree

‎.devcontainer/api/Dockerfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mcr.microsoft.com/devcontainers/go:2-1.25-trixie
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "api-devcontainer",
5+
"dockerComposeFile": ["../docker-compose.yml"],
6+
"service": "api-devcontainer",
7+
"shutdownAction": "none",
8+
"workspaceFolder": "/core/apps/api",
9+
"features": {
10+
"ghcr.io/devcontainers/features/git:1": {}
11+
}
12+
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
// "postCreateCommand": "yarn install",
19+
20+
// Configure tool-specific properties.
21+
// "customizations": {},
22+
23+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24+
// "remoteUser": "root"
25+
}

‎.devcontainer/docker-compose.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
web-devcontainer:
3+
build:
4+
context: ./web
5+
dockerfile: Dockerfile
6+
volumes:
7+
- ..:/core
8+
- /core/apps/web/node_modules
9+
command: sleep infinity
10+
11+
api-devcontainer:
12+
build:
13+
context: ./api
14+
dockerfile: Dockerfile
15+
volumes:
16+
- ..:/core
17+
command: sleep infinity

‎.devcontainer/web/Dockerfile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie
2+
3+
RUN npm install -g pnpm
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "web-devcontainer",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
// "image": "mcr.microsoft.com/devcontainers/typescript-node:4-24-trixie",
7+
"dockerComposeFile": ["../docker-compose.yml"],
8+
"service": "web-devcontainer",
9+
"shutdownAction": "none",
10+
"workspaceFolder": "/core/apps/web",
11+
"features": {
12+
"ghcr.io/devcontainers/features/git:1": {}
13+
},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Use 'postCreateCommand' to run commands after the container is created.
19+
"postCreateCommand": "pnpm i",
20+
21+
// Configure tool-specific properties.
22+
// "customizations": {},
23+
24+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25+
"remoteUser": "root"
26+
}

‎.gitattributes‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.{cmd,[cC][mM][dD]} text eol=crlf
3+
*.{bat,[bB][aA][tT]} text eol=crlf

0 commit comments

Comments
 (0)