Skip to content

Commit 3178e26

Browse files
initial project setup for api and worker
1 parent 419c1d4 commit 3178e26

File tree

122 files changed

+702
-20014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+702
-20014
lines changed

.devcontainer/devcontainer.json

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
{
22
"name": "Django Docker Environment",
3-
"remoteUser": "vscode",
3+
// "remoteUser": "vscode",
44
"postCreateCommand": "git config --global --add safe.directory /home/web/project",
55
"dockerComposeFile": [
66
"../deployment/docker-compose.yml",
77
"../deployment/docker-compose.override.devcontainer.yml"
88
],
99
"service": "dev",
10+
"runServices": ["db", "redis", "celery_beat", "worker","dev"],
1011
"workspaceFolder": "/home/web/project",
11-
"settings": {
12-
"terminal.integrated.shell.linux": "/bin/bash",
13-
"python.pythonPath": "/usr/local/bin/python",
14-
"python.linting.pylintEnabled": true,
15-
"python.linting.enabled": true
16-
},
1712
"runArgs": [
1813
"--env-file",
1914
"../deployment/.env"
2015
],
21-
"portsAttributes": {
22-
"9000": {
23-
"label": "Frontend",
24-
"onAutoForward": "notify"
16+
"forwardPorts": [8000],
17+
"shutdownAction": "stopCompose",
18+
"customizations": {
19+
"vscode": {
20+
"extensions": ["ms-python.python", "ms-azuretools.vscode-docker"],
21+
"settings": {
22+
"terminal.integrated.shell.linux": "/bin/bash",
23+
"python.pythonPath": "/usr/local/bin/python",
24+
"python.linting.pylintEnabled": true,
25+
"python.linting.enabled": true
26+
}
2527
}
26-
},
27-
"forwardPorts": [8000, 9000],
28-
"extensions": ["ms-python.python", "ms-azuretools.vscode-docker"],
29-
"shutdownAction": "stopCompose"
28+
}
3029
}

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ coverage.xml
1616

1717
django_project/.env
1818
django_project/tmp/
19-
django_project/frontend/bundles/
20-
django_project/frontend/stats.json
2119

2220
docs/site/*
2321
docks/mkdocs.yml

.run/DJANGO+REACT.run.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.run/Run Server.run.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.run/serve.run.xml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
{
8-
"name": "Launch Chrome",
9-
"request": "launch",
10-
"type": "chrome",
11-
"url": "http://localhost:8000",
12-
"webRoot": "${workspaceFolder}/django_project/frontend",
13-
"sourceMapPathOverrides": {
14-
"webpack:///./src/*": "${webRoot}/*"
15-
}
16-
},
177
{
188
"name": "Django: Run server",
199
"type": "python",
@@ -24,20 +14,6 @@
2414
],
2515
"django": true,
2616
"justMyCode": true,
27-
},
28-
{
29-
"command": "npm run serve",
30-
"name": "React: Run webpack-dev-server",
31-
"request": "launch",
32-
"type": "node-terminal",
33-
"cwd": "${workspaceFolder}/django_project/frontend",
34-
},
35-
],
36-
"compounds": [
37-
{
38-
"name": "Django + React",
39-
"configurations": ["Django: Run server", "React: Run webpack-dev-server"],
40-
"stopAll": true
4117
}
4218
]
4319
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"git.enableCommitSigning": true,
3+
"python.testing.pytestArgs": [
4+
"django_project",
5+
"-s",
6+
"-c",
7+
"${workspaceFolder}/django_project/pytest.ini"
8+
],
9+
"python.testing.unittestEnabled": false,
10+
"python.testing.pytestEnabled": true
11+
}

.vscode/tasks.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
{
22
"version": "2.0.0",
33
"tasks": [
4-
{
5-
"label": "React: Install dependencies",
6-
"type": "shell",
7-
"command": "npm install",
8-
"options": {
9-
"cwd": "${workspaceFolder}/django_project/frontend"
10-
},
11-
"group": "build",
12-
"problemMatcher": []
13-
},
14-
{
15-
"label": "React: Webpack-dev-server",
16-
"type": "shell",
17-
"command": "npm run serve",
18-
"port": 9000,
19-
"options": {
20-
"cwd": "${workspaceFolder}/django_project/frontend"
21-
},
22-
"group": "build",
23-
"problemMatcher": []
24-
},
254
{
265
"label": "Django: Migrate",
276
"type": "shell",

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,3 @@ dev:
2222
@echo "------------------------------------------------------------------"
2323
@docker-compose ${ARGS} up -d dev worker
2424
@docker-compose ${ARGS} up --no-recreate --no-deps -d
25-
26-
serve:
27-
@echo
28-
@echo "------------------------------------------------------------------"
29-
@echo "Execute webpack serve command"
30-
@echo "------------------------------------------------------------------"
31-
@docker-compose ${ARGS} exec -T dev npm --prefix /home/web/django_project/frontend run serve

deployment/.template.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
COMPOSE_PROJECT_NAME=kartoza_django_project
1+
COMPOSE_PROJECT_NAME=cplus_api
22
DJANGO_SETTINGS_MODULE=core.settings.dev
33
DATABASE_NAME=django
44
DATABASE_USERNAME=docker

0 commit comments

Comments
 (0)