Skip to content

Commit 5b68d95

Browse files
authored
feat: improved devcontainer experience (#977)
1 parent aa2f81a commit 5b68d95

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/devcontainers/python:3.12
1+
FROM mcr.microsoft.com/devcontainers/python:3.13
22

33
ENV PYTHONUNBUFFERED 1
44

.devcontainer/devcontainer.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@
55
"overrideCommand": true,
66
"workspaceFolder": "/app",
77
"forwardPorts": [8000],
8-
"postCreateCommand": "python manage.py migrate",
9-
"features": {
10-
"ghcr.io/devcontainers/features/node:1": {
11-
"version": "latest"
12-
}
13-
},
8+
"postCreateCommand": "python tests/server/manage.py migrate",
149
"customizations": {
1510
"vscode": {
1611
"settings": {
1712
"editor.formatOnSave": true,
18-
"editor.codeActionsOnSave": {
19-
"source.organizeImports": "always"
13+
"[python]": {
14+
"editor.defaultFormatter": "charliermarsh.ruff"
2015
}
2116
},
2217
"extensions": [

.devcontainer/docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
version: "3.4"
2-
31
services:
42
unfold:
3+
command: bash -c "python tests/server/manage.py migrate && python tests/server/manage.py runserver 0.0.0.0:8000"
54
build:
65
context: ..
76
dockerfile: .devcontainer/Dockerfile
87
volumes:
98
- ..:/app
10-
- ../src/unfold:/usr/local/lib/python3.12/site-packages/unfold
9+
- ../src/unfold:/usr/local/lib/python3.13/site-packages/unfold
1110
env_file:
1211
- backend.env
12+
ports:
13+
- "8000:8000"

0 commit comments

Comments
 (0)