diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..14ff7762218 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose +{ + "name": "Actual development", + "dockerComposeFile": [ + "../docker-compose.yml", + "docker-compose.yml" + ], + // Alternatively: + // "image": "mcr.microsoft.com/devcontainers/typescript-node:0-16", + "service": "actual-development", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "postCreateCommand": "yarn install" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 00000000000..25cfd46183c --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3.8' +services: + actual-development: + volumes: + - ..:/workspaces:cached + command: /bin/sh -c "while sleep 1000; do :; done" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dbfb038ce1c..98be9397e3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,10 +37,13 @@ For first time contributions you can also filter the issues labeled with "[good ## Development Environment If you would like to contribute you can fork this repository and create a branch specific to the project you are working on. -There are two options for developing: +There are three options for developing: 1. Yarn - - This is the traditional way to get an envrionment stood up. Run `yarn` to install the dependencies followed by `yarn start:browser` to start the development server. You will then be able to access Actual at `localhost:3001`. + - This is the traditional way to get an environment stood up. Run `yarn` to install the dependencies followed by `yarn start:browser` to start the development server. You will then be able to access Actual at `localhost:3001`. 2. Docker Compose - If you prefer to work with docker containers, a `docker-compose.yml` file is included. Run `docker compose up -d` to start Actual. It will be accessible at `localhost:3001`. +3. Dev container + - Directly integrated in some IDEs, dependencies will be installed automatically as you enter the container. + - Use your preferred method to `npm start` the project, your IDE should expose the project on your `localhost` for you. Both options above will dynamically update as you make changes to files. If you are making changes to the front end UI, you may have to reload the page to see any changes you make. diff --git a/docker-compose.yml b/docker-compose.yml index 566adbf2f09..782aae5f4c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,5 +12,5 @@ services: - '3001:3001' volumes: - '.:/app' - restart: no + restart: 'no' diff --git a/upcoming-release-notes/1032.md b/upcoming-release-notes/1032.md new file mode 100644 index 00000000000..e435627bafa --- /dev/null +++ b/upcoming-release-notes/1032.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [jlsjonas] +--- + +Adds support for dev containers, allowing for easier contributions. \ No newline at end of file