File size: 1,966 Bytes
ba558e6
 
 
da9b1f7
20c47af
 
 
 
31ced4c
 
 
 
ba558e6
 
 
 
 
80db45a
20c47af
 
 
 
 
 
 
 
 
 
 
 
ba558e6
 
 
 
1c1ec0f
 
 
 
 
 
 
ba558e6
80db45a
ba558e6
 
20c47af
ba558e6
20c47af
1c1ec0f
31ced4c
20c47af
 
ba558e6
 
 
 
f28be2b
ba558e6
20c47af
80db45a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
{
	"name": "django-quiz-app",
	"dockerComposeFile": "docker-compose.yml",
	"service": "app",
	"workspaceFolder": "/workspace",
	"forwardPorts": [8000, 5432],
	"portsAttributes": {
		"8000": {"label": "Django port", "onAutoForward": "notify"},
		"5432": {"label": "PostgreSQL port", "onAutoForward": "silent"}
	},
	// Configure tool-specific properties.
	"customizations": {
		// Configure properties specific to VS Code.
		"vscode": {
			// Set *default* container specific settings.json values on container create.
			"settings": {
				"sqltools.connections": [
					{
						"name": "Container database",
						"driver": "PostgreSQL",
						"previewLimit": 50,
						"server": "localhost",
						"port": 5432,
						"database": "app",
						"username": "app_user",
						"password": "app_password"
					}
				],
				"python.defaultInterpreterPath": "/usr/local/bin/python",
				"python.linting.enabled": true,
				"python.testing.unittestEnabled": false,
				"python.testing.pytestEnabled": true,
				"[python]": {
					"editor.formatOnSave": true,
					"editor.codeActionsOnSave": {
						"source.fixAll": true
					}
				},
				"python.formatting.provider": "black"
			},

			// Add the IDs of extensions you want installed when the container is created.
			"extensions": [
				"ms-azuretools.azure-dev",
				"ms-python.python",
				"ms-python.vscode-pylance",
				"charliermarsh.ruff",
				"ms-azuretools.vscode-bicep",
				"mtxr.sqltools",
				"mtxr.sqltools-driver-pg"
			]
		}
	},
	// Use 'postCreateCommand' to run commands after the container is created.
	"postCreateCommand": "pip install -r requirements-dev.txt && pre-commit install",
	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode"
}