mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
Add a .devcontainer configuration so contributors can develop Ghostfolio inside a containerized environment with Node.js, PostgreSQL and Redis pre-wired together, without needing to install anything locally besides Docker and VS Code. Closes #7380pull/7383/head
4 changed files with 79 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||||
|
FROM node:22-slim |
||||
|
|
||||
|
# Match the build tooling used by the production Dockerfile so native |
||||
|
# dependencies (e.g. Prisma) compile correctly inside the Dev Container |
||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
||||
|
g++ \ |
||||
|
git \ |
||||
|
make \ |
||||
|
openssl \ |
||||
|
python3 \ |
||||
|
&& rm -rf /var/lib/apt/lists/* |
||||
@ -0,0 +1,31 @@ |
|||||
|
{ |
||||
|
"name": "Ghostfolio", |
||||
|
"dockerComposeFile": [ |
||||
|
"../docker/docker-compose.dev.yml", |
||||
|
"docker-compose.yml" |
||||
|
], |
||||
|
"service": "app", |
||||
|
"workspaceFolder": "/workspaces/ghostfolio", |
||||
|
"shutdownAction": "stopCompose", |
||||
|
"remoteUser": "node", |
||||
|
"forwardPorts": [3333, 4200], |
||||
|
"portsAttributes": { |
||||
|
"3333": { |
||||
|
"label": "API" |
||||
|
}, |
||||
|
"4200": { |
||||
|
"label": "Client" |
||||
|
} |
||||
|
}, |
||||
|
"postCreateCommand": "npm install", |
||||
|
"customizations": { |
||||
|
"vscode": { |
||||
|
"extensions": [ |
||||
|
"angular.ng-template", |
||||
|
"esbenp.prettier-vscode", |
||||
|
"firsttris.vscode-jest-runner", |
||||
|
"nrwl.angular-console" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
services: |
||||
|
app: |
||||
|
build: |
||||
|
context: .. |
||||
|
dockerfile: .devcontainer/Dockerfile |
||||
|
volumes: |
||||
|
- ..:/workspaces/ghostfolio:cached |
||||
|
command: sleep infinity |
||||
|
depends_on: |
||||
|
postgres: |
||||
|
condition: service_healthy |
||||
|
redis: |
||||
|
condition: service_healthy |
||||
Loading…
Reference in new issue