Add devcontainer env
This commit is contained in:
1 parent
1ff82ec2ba
commit
4fd528789d
4 files changed
+69
-3
No files matched your search
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "Lunchtime Web",
|
||||
"dockerComposeFile": [
|
||||
"../src/compose.yml",
|
||||
"docker-compose.devcontainer.yml"
|
||||
],
|
||||
"service": "devcontainer",
|
||||
"workspaceFolder": "/workspaces/lunchtime-web",
|
||||
"runServices": [
|
||||
"backend",
|
||||
"frontend",
|
||||
"mailpit",
|
||||
"nginx"
|
||||
],
|
||||
"shutdownAction": "stopCompose",
|
||||
"overrideCommand": false,
|
||||
"forwardPorts": [
|
||||
8020,
|
||||
8025
|
||||
],
|
||||
"portsAttributes": {
|
||||
"8020": {
|
||||
"label": "Lunchtime",
|
||||
"onAutoForward": "openBrowser"
|
||||
},
|
||||
"8025": {
|
||||
"label": "Mailpit",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/python:1": {
|
||||
"version": "3.12"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "20"
|
||||
}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance",
|
||||
"dbaeumer.vscode-eslint"
|
||||
],
|
||||
"settings": {
|
||||
"python.analysis.extraPaths": [
|
||||
"${workspaceFolder}/src/backend"
|
||||
],
|
||||
"python.testing.pytestEnabled": false,
|
||||
"typescript.tsdk": "${workspaceFolder}/src/frontend/node_modules/typescript/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "python -m pip install --user -r src/backend/requirements.txt && npm --prefix src/frontend ci"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
devcontainer:
|
||||
image: mcr.microsoft.com/devcontainers/base:ubuntu
|
||||
command: sleep infinity
|
||||
volumes:
|
||||
- ..:/workspaces/lunchtime-web:cached
|
||||
working_dir: /workspaces/lunchtime-web
|
||||
init: true
|
||||
@@ -45,7 +45,7 @@ Then run:
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Open `http://localhost:8080`.
|
||||
Open `http://localhost:8020`.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -58,7 +58,9 @@ cd src
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
This will start the backend and frontend, proxied through Nginx at `http://localhost:8080`. Also, a Mailpit instance at `http://localhost:8025` can be used for monitoring outgoing mail.
|
||||
This will start the backend and frontend, proxied through Nginx at `http://localhost:8020`. Also, a Mailpit instance at `http://localhost:8025` can be used for monitoring outgoing mail.
|
||||
|
||||
To use the same setup from VS Code, run `Dev Containers: Reopen in Container`. The devcontainer starts the full Compose stack, including Mailpit. Backend changes reload through Uvicorn and frontend changes are served through Vite HMR.
|
||||
|
||||
### Backend Development
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
app:
|
||||
public_base_url: "http://localhost:8080/"
|
||||
public_base_url: "http://localhost:8020/"
|
||||
|
||||
email:
|
||||
enabled: true
|
||||
|
||||
Reference in new issue
Block a user