Skip to content

Commit 319993f

Browse files
authored
Merge pull request #1315 from tediousjs/arthur/add-devcontainer-config
chore: add `devcontainer` configuration
2 parents 1b8023d + 62795c7 commit 319993f

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.devcontainer/.mssql.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"user": "sa",
3+
"password": "yourStrong(!)Password",
4+
"server": "mssql",
5+
"port": 1433,
6+
"database": "master",
7+
"requestTimeout": 30000,
8+
"options": {
9+
"abortTransactionOnError": true,
10+
"encrypt": false
11+
}
12+
}

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "tediousjs/node-mssql",
3+
4+
"dockerComposeFile": "docker-compose.yml",
5+
"service": "app",
6+
7+
"workspaceFolder": "/workspace",
8+
9+
"settings": {
10+
"terminal.integrated.shell.linux": "/bin/bash"
11+
},
12+
13+
"extensions": [
14+
"ms-mssql.mssql",
15+
"dbaeumer.vscode-eslint"
16+
],
17+
18+
"postCreateCommand": "npm install",
19+
20+
"containerEnv": {
21+
"EDITOR": "code --wait"
22+
}
23+
}

.devcontainer/docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: '3'
2+
3+
services:
4+
app:
5+
image: "mcr.microsoft.com/vscode/devcontainers/javascript-node:14"
6+
7+
volumes:
8+
- "..:/workspace:cached"
9+
- "./.mssql.json:/workspace/test/.mssql.json"
10+
11+
# Overrides default command so things don't shut down after the process ends.
12+
command: "sleep infinity"
13+
14+
depends_on:
15+
- mssql
16+
17+
mssql:
18+
image: "mcr.microsoft.com/mssql/server:2019-latest"
19+
20+
restart: unless-stopped
21+
22+
environment:
23+
- "ACCEPT_EULA=Y"
24+
- "SA_PASSWORD=yourStrong(!)Password"

0 commit comments

Comments
 (0)